Caching

To reduce Internet traffic and response time, every SFS node uses local cache, making SFS highly available. If one SFS node is down, clients can switch to another node automatically. If SQL resources are temporarily unavailable, then SFS will continue to work for Read operations only. Write requests return an error that SQL is unavailable. Read operations check cache first and if the result is negative, a query is sent to the database. Write operations update both cache and database. If cache is empty on startup, SFS creates a full cache. If cache is not empty, SFS synchronizes all changes.

The SQL database keeps a list of SFS nodes and datacenters. When a cache change event happens, for example, a new service was enrolled, then the associated SFS creates a new record of the change in the ‘UpdateLog’ table and checks the database for an update every 15 seconds. During the synchronization process, SFS checks this table, applies the change, and deletes the applied records from the ‘UpdateLog’ table. Additionally, a Force cache update can be performed in Configuration Assistant to update the cache on any SFS node.