Uploaded image for project: 'Traffic Control'
  1. Traffic Control
  2. TC-66

Store CRConfig.json in the database as opposed the file system

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.0.0
    • Traffic Ops
    • 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

          Activity

            People

              mitchell852@apache.org Jeremy Mitchell
              mitchell852@apache.org Jeremy Mitchell
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: