-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
V10 load balanced #44
Conversation
…e status persistence.
…ged for opportunity to extend.
Thanks, this looks great, we will take a look this week, and see if we can get it merged and released 👍 |
fixed moving and recycling to check for IsContentFrozen instead of IsInMaintenanceMode
makes sure code works on first boot before migration is ran to create table
Hi added a couple of changes
we think checking the server role to see if umbraco thinks it's running loadbalanced is more reliable than using the config settings, but if you think that's not right, please let us know. |
Hi @henryjump Using server role totally makes sense, I was looking for something that did exactly what you've got but couldn't find it so thanks! And makes sense on the DB check to reduce the warnings 😄 |
Anything else I can contribute for this one @henryjump @KevinJump? |
we wanted to have a cache for the database lookups so the database doesn't get hit for every request so this version has a the "MaintenanceMode": {
"StorageMode": "Database",
"CacheSeconds": 30
} on a local sever changes to and from maintenance mode happens instantly, but on remote servers it may take up to Umbraco does this for the cache on load balancing, but it checks every five seconds so maybe we could have the value lower |
Good idea @henryjump. I wonder, to make it clear it's only for use in Thoughts? |
Woot! - Merged and in v10.2.0 release - https://www.nuget.org/packages/Our.Umbraco.MaintenanceMode/10.2.0 |
Resolves #33
Summary
This PR adds support for load balanced environments. It proposes the introduction of a few ideas:
IStorageProvider
in the service code to access the appropriate place to read/write settingsDatabaseStorageProvider
for use in load balanced setupsTesting
How to test?
Add the following to appsettings:
This will trigger the switch into database storage mode, observe that settings are written to and read from the database.
Note that without the app setting above, the code will attempt to determine whether Umbraco is in a load balanced setup and behave accordingly.
Also @KevinJump sorry it looks like a lot of files changed but there are a lot of one-liners in the notification handlers :)