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”| Module | M1 — The platform as deployed |
| After this session you can | Trace 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. |
| Time | Facilitated: 16 min · On your own: 16 min |
| Before you start | M1-S1: your inventory of the release. |
| Go deeper | Topology: 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:
- 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.
- 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.
- Checks who is calling: a person’s sign-in token (checked with
identity) or an application token. - Checks the caller may use that space, and resolves a delegation if the person acts for a colleague.
- Adds the shared key and forwards the request to the right Service:
/api/workflowtoworkflow,/api/v1/filestostorage, and anything not matched more precisely todata.
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.
East-west, now: HTTP between services
Section titled “East-west, now: HTTP between services”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).
East-west, later: the message bus
Section titled “East-west, later: the message bus”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:
| Rule | What it means for you |
|---|---|
| One durable queue per service | Each consumer has its own queue, such as workflow-service-queue; queues survive a broker restart |
| Persistent messages | A message waiting in a queue survives a broker restart |
| Bounded retries | A message that fails is retried, five times by default |
| Dead-letter queue | After the last retry it moves to the service’s dead-letter queue, where it waits for you (M7) |
| Concurrency per queue | One message at a time per pod by default; raised per service in values |
| Context travels with it | Each 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.
The two stores everything depends on
Section titled “The two stores everything depends on”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”A user opens a list in the portal and the request fails with 404 and the code SPACE_ERROR.
Which part answered, and why?
Check your answer
The correct answer is A. Open the explanation under each option to see why.
A message for the timeline application fails every time it is processed. With default settings, where is it after the last attempt?
Check your answer
The correct answer is C. Open the explanation under each option to see why.
Which of these does Redis hold? Choose all that apply.
Check your answer
The correct answers are A and B. Open the explanation under each option to see why.
During a RabbitMQ outage a user saves an expense claim. What do they see?
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.