What Data for This Category Looks Like
This category's data primarily comes from CDN consoles, DNS resolution records, user access logs, and monitoring alert systems. Daily produced documents include domain name access forms, cache rule configuration files, refresh and preload operation records, and fault analysis reports. Data update frequency is daily synchronization or real-time updates following configuration changes. Common data fields include connected domain names, filing status, cache rule IDs, requested node IPs, cache hit rates, alert trigger thresholds, etc. There is no unified fixed format, with minor differences depending on the console configuration of different CDN service providers.
What Constraints Do These Characteristics Impose on the Database and Operations Link
The data characteristics of this category impose multiple constraints on the database and operations link. Multi-source heterogeneous data sources require the database to support domain name access forms, cache rules, access logs, and alert data in different formats, to avoid format parsing failures. Data with different update frequencies need matching synchronization strategies: cache rules changed in real time require low-latency write support, while daily aggregated access logs require bulk import support. The mapping between documents and database fields must remain consistent, to ensure that release notes and operational reports can be directly generated by extracting corresponding fields from the database, reducing manual organization costs. At the same time, database high availability must be ensured, to avoid faults causing failed cache configuration distribution or lost access logs, which would disrupt normal business operations.
How to Set the Configurations
| Configuration Item | Recommended Approach | Rationale |
|---|---|---|
MONGODB_URI | Exclusive database connection address with authentication information, such as mongodb://user:pass@host:27017/cdn_data | Used to store unstructured data such as cache rules and fault alerts; exclusive addresses avoid permission conflicts |
PG_URL | Supabase-compatible PostgreSQL connection string, such as postgresql://user:pass@host:5432/supabase_cdn_logs | Used to store structured access logs and domain name access records, supports complex queries to generate operational reports |
DB_MAX_LINK | 20–50 connections | Matches the concurrent request limit of the CDN console, to avoid service interruptions caused by exhausted database connections |
REDIS_URL | Nearby node connection address with a password, such as redis://:pass@host:6379/0 | Used to cache frequently accessed cache rules and domain name filing status, reducing database query latency |
Three Common Mistakes
- Symptom: A connection timeout or authentication failure error is returned when attempting to connect to MongoDB, even if
MONGODB_URIis configured according to official documentation and the issue cannot be resolved. Cause: The database whitelist for the CDN data storage instance has not been configured, or the authentication information and port inMONGODB_URIdo not match the instance. - Symptom: A
text index required for $text queryerror is returned when executing a knowledge base query. Cause: A full-text index has not been created for the PostgreSQL table storing CDN access logs, making it impossible to perform text searches to match cache rules or fault keywords. - Symptom: Relevant answers cannot be extracted after a full table query from the database, or the knowledge base index only returns irrelevant content. Cause: Core fields such as connected domain names and cache rule IDs have not been set as indexes, preventing the database from quickly filtering valid data, or index fields have not been split according to CDN business logic.
How to Confirm the Configuration Is Complete
This verification process applies to FastGPT v4.17.0.
- Perform a database connection test to verify that
MONGODB_URIandPG_URLcan read and write the corresponding data tables normally, and confirm that the connection status is normal. - Check the database index configuration to confirm that core fields such as connected domain names and cache rule IDs have been created as indexes, and the index type matches business query requirements.
- Trigger a cache rule change operation to verify that the database can synchronously record the changed content, and the generated release notes can automatically extract the corresponding fields.
- View the monitoring alert system to confirm that the number of database connections does not exceed the limit set by
DB_MAX_LINK, and there are no connection exhaustion alerts.
The values provided are common starting points and should be measured against the reader's own samples.
Question material comes from public community discussions. Configuration values are common starting points and should be measured against your own samples. Verified on 2026-10-19.