Answer the question
In order to leave comments, you need to log in
How to calculate the uptime of an asynchronous server?
There is a formula for calculating uptime in percent, 100 - (downtime / totaltime) * 100
where totaltime - all the time of work, downtime - time while the server was unavailable.
And if the server is asynchronous, for example:
1. In one second, the server received two requests and began to process them in parallel
2. One of the requests was successful, and the second one took an unacceptably long time and the client did not receive a response.
How to apply the uptime calculation formula in this case?
UPD:
In my case, by the word uptime, I mean the percentage of availability.
Answer the question
In order to leave comments, you need to log in
In your case, the formula is:
sum of successful requests \(sum of successful + sum of unsuccessful) * 100%
Is there a service time somewhere in this formula? Downtime - the time the server was down. Uptime - when enabled. Errors are not taken into account by this indicator.
There is the concept of accessibility (what you counted). There are some quality parameters (for example, % errors). So the degradation of quality parameters is not the unavailability of the service.
Log errors, process the log and consider what is needed.
You can immediately shove the entire statue into prometheus, etc. if there are backend sources, or from nginx via lua, or even 100500 more options, in short, monitor all errors and count as you please.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question