An online shop runs on two copies of the same application — the lab-backend@8081 and lab-backend@8082 services. nginx sits in front of them and splits the requests between them. At night the on-call engineer gets complaints: the page sometimes opens and sometimes shows an error.
Check the copies and request the site a few times. “Start” will prepare the server.
Request the site six times
Check whether both copies of the application — the lab-backend@8081 and lab-backend@8082 services — are running, then request the site six times in a row.
How were the errors spread over the site's six answers?
-
The order is even:
500is the second, fourth and sixth answer. Run the loop again and the order is the same. -
The output has three
200answers: the first, third and fifth. -
The codes alternate from the first request:
200,500,200,500… No copy broke in the middle of the loop.
The answers alternate: 200, 500, 200, 500, 200, 500.