What metric is used to measure service availability?
AI answer
Availability is usually measured as the proportion of time that a service meets the agreed health criteria:
Availability = successful requests / all valid requests × 100%
For a user-facing API, success is often defined as the proportion of responses that have no server errors and meet the acceptable latency threshold. Another option is the proportion of time the service is healthy. The metric should be tied to SLI and SLO targets—for example, 99.9% of successful requests over a month. Define in advance which requests are included in the calculation, how planned maintenance is handled, and which status codes count as errors.
Also asked at Коммит (Аутстафф на проект "Ростелекома")
- How to protect the system from creating multiple payments if the user presses the pay button many times?
- How is the N+1 query problem solved in ORM?
- What types of indexes are available in PostgreSQL?
- There are several services (2-3), and there is an end-to-end business scenario passing through all services. If an operation on one of the services in the middle or at the end fails, the system ends up in an inconsistent state. What methods can be used to achieve inter-service transactionality (either the entire scenario is applied, or none of it is), if each service has its own database?
- What databases have you worked with the most?
Similar questions
- How would you measure how often a bug can be reproduced?
- What do you consider a high load: how many requests per second or per minute?
- Did you have some kind of test coverage metric? What was it called?
- How can you tell that a service is showing signs of degradation or has stopped functioning? What error codes would you expect?
- If you receive a 503 Service Unavailable error while testing an API, how would you figure out what happened, and whom would you contact?