You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by "Jeremy Mitchell (JIRA)" <ji...@apache.org> on 2017/01/18 18:28:27 UTC

[jira] [Resolved] (TC-66) Store CRConfig.json in the database as opposed the file system

     [ https://issues.apache.org/jira/browse/TC-66?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jeremy Mitchell resolved TC-66.
-------------------------------
    Resolution: Fixed

> Store CRConfig.json in the database as opposed the file system
> --------------------------------------------------------------
>
>                 Key: TC-66
>                 URL: https://issues.apache.org/jira/browse/TC-66
>             Project: Traffic Control
>          Issue Type: Improvement
>          Components: Traffic Ops
>            Reporter: Jeremy Mitchell
>            Assignee: Jeremy Mitchell
>             Fix For: 2.0.0
>
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)