Skip to content

Add a CDN support#76

Draft
Cinkafox wants to merge 4 commits intoSimple-Station:masterfrom
Cinkafox:cdn-think
Draft

Add a CDN support#76
Cinkafox wants to merge 4 commits intoSimple-Station:masterfrom
Cinkafox:cdn-think

Conversation

@Cinkafox
Copy link

@Cinkafox Cinkafox commented Feb 9, 2026

Add CDN-based mechanism to identify the fastest available endpoint and implement corresponding routing logic.

UI may change later.
изображение

Mechanism Overview

The system operates by substituting all URLs with UriCdnDefinition placeholders. The CDN Manager processes these definitions as follows:

  1. Configuration Loading
    A configuration file contains the mapping of UriCdnDefinition entries to their corresponding URLs. On initialization, CdnManager reads this file.

  2. Default Values
    If the configuration file is missing or empty, the manager automatically populates it with predefined default values.

  3. Performance Optimization
    URLs are sorted by latency (ping) to prioritize the fastest endpoints.

  4. Resolution
    The sorted URLs are stored in a dictionary within CdnManager. Clients can resolve a definition to an actual URI using the ResolveDefinition method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments