Skip to content
POLARISAI ACADEMY
Going deeper (optional)

This lesson is an optional deeper look that goes with course F02. It has worked examples with numbers and technical words. Start with F02 if you are new. Go to course F02 →

FD02 · First Light

The 300 Words of AI, Code and Operations

After this you can take a short failure log, name the glossary term it points to, and choose the first action before you change any code. You use the Polaris glossary at /ordlistan the way a mechanic uses a parts list.

Level
First Light
Time
12 h (estimate)
Prerequisites
F02
Course 2 of 7
Jump to

After this course you can

The student can match 100 failure logs, architecture diagrams, and incident snippets to the exact glossary term and remediation step in /ordlistan.

Read the line, then the list

A log line is a short sentence from a machine. It names a status, a time, and a count. You turn that sentence into one term you can look up, then into one first action. The Polaris glossary at /ordlistan gives the plain name, what you see, and the first move. Guessing from the English words alone sends you to the wrong layer. A line about too many requests can be a limit set on purpose. A timeout can mean you stopped waiting while the other side kept going.

Work in a fixed order. Copy the distinctive words from the log, the status code or the word timeout. Search /ordlistan for those words. Read the entry until you can say what failed, who imposed the limit or the wait, and what you do before you touch config. Then check the neighbors. A 429 sits next to retry behavior, and a timeout sits next to whether the work already happened. Write the term and the first action in the margin of the incident note.

What one entry gives you

Open rate limiting in /ordlistan when you see HTTP 429 Too Many Requests. That status means the server refused the call because the client crossed a request limit. The first action is to stop the burst and wait. If the response includes a Retry-After value, wait at least that many seconds before you send the next call. In an example with a limit of 60 requests a minute and a log that shows 120, the overflow is 120 minus 60, which is 60.

A timeout line means the caller gave up after a set wait because no answer came back. The first action is to ask whether the server may still be doing the work. If you send the same call again at once, you can stack a second run on top of the first. Look up retry with backoff next. Backoff means each new try waits longer than the last. An example series is 1 second, then 2, then 4. Those waits add to 7 seconds, which you can check by hand.

When a second try does the work twice

Idempotency sits with timeout and retry. A call is idempotent when doing it twice leaves the same result as doing it once. Reading a record is usually safe to repeat. Creating a payment, sending mail, or inserting a row can run twice if you retry after a timeout. Look in /ordlistan for an idempotency key, a token the client stores with the first attempt. If the same key arrives again, the server returns the original result and does not start a second job.

Put the four terms in order on paper when you review a log. Rate limiting explains a 429. Timeout explains a wait that ended with no body. Retry with backoff is the spacing so later tries do not rebuild the 429. Idempotency keeps a repeated call from doubling a side effect. The first action follows the earliest term in that chain. If you are over the limit, slow down before you redesign retries. If a write timed out, check the key before you send the call again.

Sketches, notes, and the long list

Architecture sketches use the same words as logs, with boxes and arrows. An arrow into a gateway box with a note of 60 per minute is rate limiting. A dashed arrow that stops at 8 seconds is a timeout. You can name the term without a long error dump. Incident notes are shorter. Users got 429 after the mail went out, or checkout hung and we clicked pay again, still points at one entry. Underline the clue, match it in /ordlistan, and write the first action beside it.

On the operations and security part of /ordlistan, learn to recognize each term as it shows up, from rate limiting through postmortem. Recognition means you can say which failure the word names and what the first step usually is. Open the full entry when the incident is yours to fix. A postmortem is the write-up after the outage: what broke, how you knew, and what you changed. When you see that word on a ticket, read for the action that stuck and compare it with today's log.

One hundred scraps is a solid practice pile: failure logs, small sketches, and incident lines. For each scrap, write two things. The glossary term, copied as it appears in /ordlistan, and the first action in one sentence. If you cannot point to the entry, search the words on the scrap. After a few evenings the shapes separate. A 429 with a rising count is rate limiting. A wait that ends with no body is a timeout. A second click after that wait is where you check idempotency.

An example

One minute of log, four terms

Take this example log. Between 12:00:00 and 12:00:59 a worker sends 120 requests. The stated limit is 60 requests in that minute. The span is 60 seconds, so the average rate is 120 divided by 60, which is 2 requests a second. The allowed rate is 60 divided by 60, which is 1 request a second. The overflow is 120 minus 60, which is 60 requests. At 12:00:20 the service answers HTTP 429 Too Many Requests and sets Retry-After to 30. Those numbers are enough to name the entry.

Look up rate limiting in /ordlistan. The 429 is the server refusing work because the worker ran at twice the allowed rate, 2 per second against 1 per second. Retry-After: 30 means the earliest next call is 12:00:20 plus 30 seconds, which is 12:00:50. The example log then shows a retry at 12:00:20.2. The gap is 0.2 seconds, and 0.2 is below 30, so this retry ignores the header. The first action is to pause until 12:00:50 and to send at most 60 requests in the next minute.

At 12:01:05 the log says POST /orders timed out after 8000 ms with no response body. 8000 divided by 1000 is 8 seconds. The client stopped waiting after that budget. The term is timeout. First action: find out whether order 441 was created anyway. At 12:01:06 the worker posts the same order again, which is 1 second later. A second create can insert a second row if the first request landed. Look up idempotency and resend with the same key as the first POST.

Retry with backoff is the spacing for attempts that are still legal. An example schedule after you have honored the 30 second Retry-After is to wait 1 second, then 2, then 4 before three further tries. Add those gaps: 1 plus 2 plus 4 is 7 seconds of extra quiet. Use the schedule only after 12:00:50. If you start the 1 second gap at 12:00:20, you are back in the burst the 429 just stopped. Cap the tries. Three extra attempts mean four tries in total, the original plus three.

Exercise

Match three lines

Do this on paper or in a text editor. Line 1: HTTP 429 Too Many Requests, Retry-After: 10, 200 calls in 60 seconds, limit 100 per minute. Line 2: POST /pay timeout after 5000 ms, no body, client retried at once with a new idempotency key. Line 3: attempt 1 failed, slept 1s, attempt 2 failed, slept 2s, attempt 3 failed, slept 4s, then stopped. For each line, name the /ordlistan term and write the first action in one sentence. Show the arithmetic for line 1 and line 3.

When line 1 is right, the term is rate limiting. The overflow is 200 minus 100, which is 100 calls. The first action is to wait at least the Retry-After of 10 seconds, then stay at or under 100 calls in the next minute. The average on that line is 200 divided by 60 seconds. That is 10/3 requests a second, just over 3. The allowance is 100 divided by 60, or 5/3 a second, about 1.7. Write both rates beside the term.

When line 2 is right, you name timeout and idempotency. 5000 ms divided by 1000 is 5 seconds, so the client quit after 5 seconds with no body. The first action is to learn whether the payment landed, then retry only with the same idempotency key. When line 3 is right, the term is retry with backoff. The gaps are 1, 2, and 4 seconds, and 1 plus 2 plus 4 is 7. Use a free chatbot only to compare after the note is done.

Check questions

Answer on your own first. Then open a question to see the answer.

In the worked example, how many requests were over the limit in that minute, and which glossary term matches HTTP 429 Too Many Requests?

120 minus 60 is 60 requests over the limit. The term is rate limiting. The first action is to pause until 12:00:50 and then send at most 60 requests in the next minute.

The example retries at 12:00:20.2 after Retry-After: 30. Why is that the wrong first action?

12:00:20 plus 30 seconds is 12:00:50. The gap is 0.2 seconds, which is below 30, so the retry ignores the header and keeps the burst going.

POST /orders times out after 8000 ms and is sent again at 12:01:06 with a new idempotency key. What should you do instead?

8000 divided by 1000 is 8 seconds. Find out whether order 441 was created. If you resend, use the same idempotency key so the server does not start a second order.

An example backoff uses waits of 1, 2, and 4 seconds. What is the total of those waits, and when may that schedule start if Retry-After is 30 seconds from 12:00:20?

1 plus 2 plus 4 is 7 seconds. Start the schedule only after 12:00:50, because the Retry-After wait is the earliest legal next call.

Take with you

Copy the sharp words from the log, open /ordlistan, and write the term plus one first action before you retry anything. On a 429, wait out the limit, and on a timeout check whether the work already happened and keep the same idempotency key if you must send it again.

Final task

Pass a 50-item keyed diagnostic benchmark mapping real-world error logs and HTTP/system traces to their exact term slugs in /ordlistan, and build a JSON-lookup CLI/web triage script passing 15 fixed automated tests.

The final task is marked against fixed answer keys and automated tests once the tests open.

Tests and diplomas coming

This lesson is open to read. Tests, diplomas and accounts come later; the waitlist is for those. Join the waitlist