SPIKE - determine how to utilize the umbracoServer table to store lastsynced.txt info
See original GitHub issueCurrently we store a text file locally: App_Data/DistCache/lastsycned.txt
which stores an INT id of the last cache instruction read from the database which allows for flexible load balancing to work along with ensuring the in-memory cache is robust even between appdomain restarts and overlapping appdomains during restarts.
It would however be better if we stored this value in the database directly instead of on disk. For LB and Azure scenarios, this file is normally located on the local fast drive or local %temp% drive. This is because this value is specific to the server/IIS site running the website, not the website itself. In some cases if the local fast drive is not available, it means this file cannot be read and a cold boot will take place which is not ideal. Another problem with storing as a file is that you cannot easily force a cold boot on a particular server without accessing the server’s files directly and removing this file whereas if it were in the db you could centrally control this.
This task is determine the sub tasks it will take in order to achieve this. We would need to store a website identifier in the database that is unique to the IIS website, normally we would do this as a hash of the MachineName + AppDomainAppId which i think would be sufficient in all cases. The value stored in the umbracoServer
table is this combination IIRC, the value looks like TEAMCANADA3//LM/W3SVC/18/ROOT
so I think we are already storing this unique identifier correctly.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (5 by maintainers)
You would need to consider scenarios where the DatabaseServerRegistrar has been replaced and so the umbracoServer table isn’t in use. Slave servers also may have readonly access to the database.
Good effort, have created sub tasks for those items.