Skip to content

M1-S2 — How the parts talk, and what stops when one fails

Section titled “M1-S2 — How the parts talk, and what stops when one fails”
ModuleM1 — The platform as deployed
After this session you canTrace a request and an event through the platform, and predict what users and logs show when Redis, the message bus or the data pod stops.
TimeFacilitated: 16 min · On your own: 16 min
Before you startM1-S1: your inventory of the release.
Go deeperTopology: the message bus · Gateway operations · Architecture diagrams

◆ Orientation (1 min) — Boxes are not enough

Section titled “◆ Orientation (1 min) — Boxes are not enough”

Your inventory says what runs. It does not say why a Redis restart can stop every sign-in, or why a record saved in the portal shows up in the search a few seconds later. For that you need the connections: three ways in which the parts of Osos talk, and two stores that everything depends on.

▤ Concept (6 min) — Three ways to talk, two stores to depend on

Section titled “▤ Concept (6 min) — Three ways to talk, two stores to depend on”

North-south: from the browser to an application

Section titled “North-south: from the browser to an application”

Every request from a browser or an integration enters through the ingress, which splits it by path. The web portal’s pages go to web. Sign-in pages go to identity. Live updates go to websocket. Everything under /api goes to the gateway, apigateway, which is the single front door for the platform’s API.

The gateway does five jobs, in this order, before an application sees the request:

  1. Stamps a correlation id on the request, or keeps the one the caller sent. Every log line about this request carries it, in every service. You follow it in M5.
  2. Works out which domain and space the address belongs to, from the lists the platform keeps in Redis. You met domains and spaces in ACSA as the administrator’s records (ACSA M3-S1); here they are what makes an address known. An unknown address is refused at this step.
  3. Checks who is calling: a person’s sign-in token (checked with identity) or an application token.
  4. Checks the caller may use that space, and resolves a delegation if the person acts for a colleague.
  5. Adds the shared key and forwards the request to the right Service: /api/workflow to workflow, /api/v1/files to storage, and anything not matched more precisely to data.

The shared key (secrets.sharedKey) is how services recognize a request that came through the gateway or from another service. The gateway removes any copy a caller tries to send. Every application must hold the same key as the gateway; M3-S2 shows what happens when they disagree.

flowchart LR
  B["Browser"] --> I["Ingress"]
  I -->|"/"| W["web"]
  I -->|"/identity, /auth, /token"| ID["identity"]
  I -->|"/socket"| WS["websocket"]
  I -->|"/api"| G["gateway"]
  G -->|"looks up domain and space"| R[("Redis")]
  G -->|"checks token"| ID
  G -->|"/api/workflow"| WF["workflow (core-rest)"]
  G -->|"/api (rest)"| D["data (core-data)"]

What to notice: the gateway consults Redis on every request before it forwards anything. That is why Redis is on the critical path for the whole API.

Services also call each other directly over HTTP, using the Service names from your inventory, with the shared key on every call. Most of these calls go to data, the hub of the platform. Inside a combined pod, a call from one hosted application to another can be dispatched in process, without going over the network; the result, logs and errors are the same. You can switch that off per pod as a recovery step (M7).

Most work does not happen inside the request. When someone saves a record, data stores it and publishes an event on RabbitMQ. The services that care (workflow, reactions, the timeline, search indexing, notifications) each receive it from their own queue and do their part. The bus follows a fixed contract:

RuleWhat it means for you
One durable queue per serviceEach consumer has its own queue, such as workflow-service-queue; queues survive a broker restart
Persistent messagesA message waiting in a queue survives a broker restart
Bounded retriesA message that fails is retried, five times by default
Dead-letter queueAfter the last retry it moves to the service’s dead-letter queue, where it waits for you (M7)
Concurrency per queueOne message at a time per pod by default; raised per service in values
Context travels with itEach message carries the user, the space and the correlation id of the request that caused it

The chart creates the bus’s virtual host on install, with quorum queues by default, through the message-bus set-up Job you found in your inventory.

MongoDB holds what must never be lost: records, definitions, settings, users, scheduled jobs and each application’s own data. Redis holds what makes the platform fast and routable: the domain and space lists the gateway reads, cached sign-in checks, background job queues for search indexing, and the live-update fan-out. Its keys start with the release name (nw-), so several releases can share one Redis without colliding.

Redis looks like “just a cache”, but the gateway cannot route a single API request without it. Treat it as critical infrastructure (M6).

◇ Worked scenario (3 min) — Three outages on a Tuesday

Section titled “◇ Worked scenario (3 min) — Three outages on a Tuesday”

You run Northwind’s production release. On three separate Tuesdays, one part stops. Before reading each answer, decide what the users see and where you would look first.

Tuesday 1: Redis stops for four minutes.

Decide: who notices, and what do they see?

Everyone using the API notices at once. The gateway cannot read the domain and space lists, so it answers every /api request with 500 REDIS_ERROR before any authentication. The portal’s pages still load (they come from web), but every list and form inside them fails. Background indexing also stops, because its job queue lives in Redis. You look first at the gateway’s logs and Redis’s health, not at the applications: their logs are quiet, because no request reaches them. When Redis returns, traffic resumes without a restart.

Tuesday 2: the core-data pod is killed by an out-of-memory error.

Decide: is this the same symptom as Tuesday 1?

No. The gateway still routes, so requests are accepted and forwarded, but every request that needs data (most of them) fails with a 5xx error from the gateway’s upstream while the pod restarts. Requests for applications in core-rest that do not call data can still succeed, but few do, because data is the hub. Events published before the crash wait safely in their queues. You look at kubectl get pods, the pod’s last state (OOMKilled) and its memory settings (M6).

Tuesday 3: RabbitMQ is restarted during a maintenance window.

Decide: what is lost?

Nothing that was already queued: queues are durable and messages persistent. For the minutes the broker is down, saving a record still works if data can write to MongoDB, but the follow-up work (workflow steps, reactions, notifications, search updates) waits. Users see records saved, but emails and status changes arrive late. Once the broker is back, services reconnect and the queues drain. You confirm it in RabbitMQ’s management view: every service queue with a consumer, and the dead-letter queues not growing.

The pattern. Ask first: which store or part did this request or event need? The answer tells you whether the symptom is “everything fails at the door” (Redis, gateway), “most things fail inside” (data), or “things happen late” (the bus). M7 turns this into your triage method.

✓ Practice (5 min) — Check your understanding

Section titled “✓ Practice (5 min) — Check your understanding”
PracticeChoose one answer.

A user opens a list in the portal and the request fails with 404 and the code SPACE_ERROR. Which part answered, and why?

  1. Explanation for A

    ✓ Correct

    Correct: working out the space from the address is the gateway’s second job, before any authentication; you meet this error again in M3. See North-south.

  2. Explanation for B

    ✗ Incorrect

    Not this one: a space the user may not use is refused later, with a different answer. See North-south.

  3. Explanation for C

    ✗ Incorrect

    Not this one: an unrouted path gets the ingress controller’s plain 404, without a platform error code. See North-south.

Check your answer

The correct answer is A. Open the explanation under each option to see why.

PracticeChoose one answer.

A message for the timeline application fails every time it is processed. With default settings, where is it after the last attempt?

  1. Explanation for A

    ✗ Incorrect

    Not this one: the bus never silently drops a failing message. See The message bus.

  2. Explanation for B

    ✗ Incorrect

    Not this one: retries are bounded, five by default. See The message bus.

  3. Explanation for C

    ✓ Correct

    Correct: after the last retry a message is dead-lettered; replaying it is an M7 runbook. See The message bus.

Check your answer

The correct answer is C. Open the explanation under each option to see why.

PracticeChoose every answer that applies.

Which of these does Redis hold? Choose all that apply.

  1. Explanation for A

    ✓ Correct

    Correct: without these, the gateway refuses requests at the door. See The two stores.

  2. Explanation for B

    ✓ Correct

    Correct: indexing runs background jobs whose queues live in Redis. See The two stores.

  3. Explanation for C

    ✗ Incorrect

    Not this one: records live in MongoDB, which is why MongoDB is what you back up first. See The two stores.

  4. Explanation for D

    ✗ Incorrect

    Not this one: those wait in RabbitMQ queues, which are durable. See The message bus.

Check your answer

The correct answers are A and B. Open the explanation under each option to see why.

PracticeChoose one answer.

During a RabbitMQ outage a user saves an expense claim. What do they see?

  1. Explanation for A

    ✗ Incorrect

    Not this one: saving needs data and MongoDB, not the bus. See Three outages on a Tuesday.

  2. Explanation for B

    ✓ Correct

    Correct: follow-up work travels on the bus and waits until it returns. See Three outages on a Tuesday.

  3. Explanation for C

    ✗ Incorrect

    Not this one: the save happens once; only the follow-up events wait. See The message bus.

Check your answer

The correct answer is B. Open the explanation under each option to see why.

↺ Recap (1 min) — After Module 1 you can

Section titled “↺ Recap (1 min) — After Module 1 you can”

After this module you can read the chart before installing it, say for any workload what it is and what it hosts, trace a request and an event through the platform, and predict the symptoms of a Redis, bus or data-pod outage.

Next. Module 2 installs it. In M2-S1 you write the values and secrets that turn the chart into Northwind’s release, and learn which mistakes the chart refuses to render and which only show up once pods start.