Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
The desire to have a highly-available traffic ops (HA TO) is complicated by the current method of storing CRConfig.json on the file system at public/CRConfig-Snapshots/:cdn_name/CRConfig.json
With Postgres' support of a json datatype, it has been determined that storing the json for CRConfig.json in the database is the best option so we can support a HA TO.
I plan to create a new table entitled snapshot with 3 columns: cdn, content (type=json) and last_updated. In this table will only be one row per cdn which represents the json of the last snapshot. Going forward we may entertain a more robust solution (i.e. snapshot versioning) but this simple solution helps us get to HA TO quickly.
Things that will change:
- snapshot will write json to snapshot table rather than file system
- snapshot diff will use the json in the snapshot table (if any) as the source of the diff rather than json on file system
- snapshot fetch (/CRConfig-Snapshots/cdn-1/CRConfig.json) will fetch json from db rather than file system.
Attachments
Issue Links
- links to