Implement read-only mode
See original GitHub issueAs part of https://github.com/mozilla/addons-server/issues/1050 we implemented a read-only notification for the API as well.
The behavior is as follows:
In case of a maintainance / read-only mode get’s turned on…
GET
requests behave normalPOST
,PUT
andDELETE
requests return503
with a json response that contains a localized error message- A custom
X-AMO-Read-Only
header is set totrue
- a
Retry-After
header may be set, it’s not a requirement though
In case that maintainance / read-only mode get’s turned off…
GET
,POST
,PUT
,DELETE
requests behave normal againX-AMO-Read-Only
header is set tofalse
Since we’re expecting a maintainance relatively soon it’d be really nice to give this a higher priority, hoping it’s not too much work. But let me know in case it’s more work and needs more time.
Issue Analytics
- State:
- Created 5 years ago
- Comments:25 (20 by maintainers)
Top Results From Across the Web
Read-Only Mode For Better Rails Downtime
Read-Only Mode For Better Rails Downtime. Recently I was looking to upgrade the Postgres version on an application I've been working on.
Read more >How to make your app compatible with read-only mode
When a site is placed in read-only mode, users will be able to view pages and their history, but not create, edit, comment, ......
Read more >Read only mode for Ruby on Rails application
If a model is set to readonly (normally done by calling #readonly! on it), any try to save the record will raise an...
Read more >HTML attribute: readonly - HTML: HyperText Markup Language
The Boolean readonly attribute, when present, makes the element not mutable, meaning the user can not edit the control.
Read more >Read-Only Mode
Access to your data at a moment's notice—even during our planned maintenance windows. To minimize interruption to your business, Salesforce gives users re....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Given that error messages is updated for
503
responses in case of read-only mode, everything just works already:There is no need to change anything.
@muffinresearch It looks like @willdurand has answered your question. Doesn’t seem like a huge task.