The third complaint reached a program, and it answered not-ready. Two different numbers tell whether such an answer counts as success.
An HTTP answer starts with a status, a three-digit number: 200 — done, 404 — no such page, 503 — the service is temporarily not ready. The -w 'http=%{http_code}\n' option asks curl to print the status after the answer.
The command itself has a result of its own, the exit code: 0 means success, any other number an error. echo $? prints it right after the command; the next command overwrites it.
A 503 answer through curl's eyes
Request /health from the client without -f, printing the status, then with -f. Right after each curl, run echo $?.
First, predict
The server answered /health with status 503. What will the first echo $?, after curl without -f, print?
Now start the exercise, run the command and compare your prediction with the output.