Report repair work on the server

    Update Habr, which took place last night, prompted to write a short note. During technical works, Habr hangs out a one-page plug, the text on which says about the ongoing work. A stub is sent to all the requested addresses. No redirect: at what address of the article do not go - everywhere the same text about the repair. In this case, the server response is accompanied by the status "HTTP / 1.1 200 OK". Most sites I know do. And if a person, by and large, doesn’t care, then the search engine indexing the site at that moment sees that the content has been updated at the address of the article - the index needs to be updated.

    These are all modal windows that the programmers came up with:
    [some garbage happened] - [OK] - Yes, this is not a damn OK!
    @mad_escape

    The solution was invented before us and has been standardized for a long time - this is an answer with code 503 , which speaks about the temporary unavailability of the server. If you know what time it will take to work, then this is also correctly reported using the Retry-After header .

    Thus, from the point of view of http, hourly downtime should be reported to customers as follows: The search engine when you visit the site will understand that it’s better not to disturb it yet, but you can go in after an hour.

    HTTP/1.1 503 Service Unavailable
    Retry-After: 3600



    Also popular now: