Senior review 2 — Python backend, messaging and AWS — prep map

Updated 10 min read source
On this page10
  1. 🔴 Step 1 — Python and FastAPI
  2. 🔴 Step 2 — PostgreSQL
  3. 🟡 Step 3 — MongoDB
  4. 🔴 Step 4 — Docker
  5. 🔴 Step 5 — Nginx and OpenResty (flagged)
  6. 🔴 Step 6 — Matrix messaging stack (niche, flagged)
  7. 🔴 Step 7 — Real-time: VoIP, STUN and TURN (flagged)
  8. 🟡 Step 8 — AWS (ElastiCache and Route 53 flagged)
  9. 🟡 Step 9 — Cloudflare (edge)
  10. 🟡 Step 10 — Non-functional: reliability, security, performance, scaling

Senior review 2 — Python backend, messaging and AWS — prep map

The themes for a senior Python backend role on a Matrix-based messaging product (October 2026): FastAPI and PostgreSQL at the core, Docker and Nginx in front, a Matrix homeserver with push and calls, AWS and Cloudflare around it. Read top to bottom; tick an item once you can explain and defend it under questioning, not merely when you have read it.

The recruiter flagged Nginx/OpenResty, ElastiCache and Route 53 as gaps. Synapse/Matrix, Sygnal and TURN/VoIP are the least common skills on the list and the likeliest “do you have experience with…” questions, so they are marked core too.

Bold is the main read for an item, an Article where one exists. Created 2026-10-15 from existing notes; the seven items no note covered (Matrix and Synapse, Sygnal, FCM, VoIP, STUN/TURN, OpenResty, Cloudflare) were written as new Articles the same day, and their summaries name what each demonstrates, including the local runs.

Priority: 🔴 core (asked, or flagged as a gap) · 🟡 important · 🟢 breadth


🔴 Step 1 — Python and FastAPI

🔴 Step 2 — PostgreSQL

🟡 Step 3 — MongoDB

🔴 Step 4 — Docker

🔴 Step 5 — Nginx and OpenResty (flagged)

🔴 Step 6 — Matrix messaging stack (niche, flagged)

  • Matrix and Synapse — rooms as replicated event DAGs (PDUs vs EDUs, prev_events, auth_events, state keyed by type and state_key); how a server trusts a relayed event (run with canonicaljson/signedjson: a rewritten body keeps the event ID and signature but fails the content hash and is shown redacted; a changed sender breaks both); state resolution and room version 12 (State Resolution v2.1, Project Hydra); /sync long polling and Simplified Sliding Sync; federation discovery, 8448 and .well-known; Synapse 1.163 workers over Redis, /sync routed per user, initial syncs isolated; state_groups_state growthMatrix and SynapseWebSocket proxyingShort vs long pollingConsensus and leader election
  • Sygnal (push gateway) — why the homeserver does not call FCM itself (the app publisher’s credentials); pusher registration and app_id; the /_matrix/push/v1/notify contract run locally: the full format sends the message body to Google or Apple, event_id_only sends only IDs and counts, and rejected pushkeys must be deleted; encrypted rooms and client-side push rules; Sygnal 0.17 config (FCM v1 service account, APNs .p8 token auth); expired certificates, sandbox vs productionSygnal: the Matrix push gatewayFCM and APNsNotification fan-out
  • Firebase Cloud Messaging — registration tokens per install; HTTP v1 with a service-account JWT exchanged for a 1-hour OAuth token, and APNs ES256 provider tokens from a .p8 key (both generated locally with PyJWT); notification vs data messages, priority and deprioritisation, mutable-content, collapse keys, ~4 KB payloads; errors as instructions (UNREGISTERED → delete), firebase-admin 7 send_each; token hygiene (270-day Android expiry); the legacy API shut down from July 2024FCM and APNsSygnalNotification fan-outNotification center

🔴 Step 7 — Real-time: VoIP, STUN and TURN (flagged)

  • VoIP over WebRTC — signalling as m.call.* room events (invite, candidates, answer, select_answer, negotiate, hangup), media never through the homeserver; every device rings and party_id picks one; invite lifetime, glare by the smaller call_id, batched candidates (and the IP addresses they put in room history); GET /voip/turnServer and Synapse’s turn_shared_secret; group calls: mesh uploads N-1 streams, so MatrixRTC with a LiveKit SFU and lk-jwt-serviceVoIP calls on MatrixSTUN, TURN and coturnWebRTC and WebTransport
  • STUN vs TURN, and coturn — NAT mapping types decide whether a direct path exists (run: one socket, two STUN providers, two different public ports → symmetric NAT, TURN needed); ICE candidates host, server-reflexive, relay; TURN relay bandwidth cost; time-limited REST credentials (HMAC of expiry:user); a coturn config with TLS on 443, relay range, quotas and denied-peer-ip for private, link-local and metadata ranges, and the 2026 CVEs that bypassed it with IPv4-mapped IPv6 (upgrade to 4.16+); placement, metrics, “no audio” debuggingSTUN, TURN and coturnNATVoIP calls on MatrixTCP vs UDP

🟡 Step 8 — AWS (ElastiCache and Route 53 flagged)

  • EC2 — instance families and sizing, AMIs and launch templates, security groups vs NACLs, instance profiles instead of keysEC2AWS interview essentials
  • ElastiCache (flagged) — Redis/Valkey vs Memcached, cluster mode on and off, endpoints, failover and what a client sees during it, connection pools on Kubernetes, cache-aside, sessions and pub/subElastiCacheFailover and serverlessWhat is RedisCache consistency
  • Route 53 (flagged) — hosted zones, alias vs CNAME at the zone apex, routing policies (weighted, latency, failover, geolocation), health checks, TTLs during a cutoverRoute 53DNS
  • Secrets Manager — storing and rotating credentials, the rotation Lambda, caching secrets in the app, Parameter Store as the cheaper optionSecrets ManagerRotation and Parameter Store
  • CloudWatch — logs, metrics and alarms, metric filters, alarms on percentiles, the cost traps (high-cardinality custom metrics, log ingestion)CloudWatchCost and advanced patternsSLOs and burn rates
  • S3 — presigned URLs for direct uploads and downloads, bucket policies vs IAM, Block Public Access, storage classes and lifecycle rulesS3File uploadsCDN and signed URLs

🟡 Step 9 — Cloudflare (edge)

  • Cloudflare — proxied vs DNS-only and the anycast edge (run: this site’s names resolve inside Cloudflare’s 15 IPv4 and 7 IPv6 ranges; Server, CF-Ray, CF-Cache-Status headers); SSL modes (Flexible’s redirect loop, Full (strict) with an Origin CA certificate); what is cached by default (extensions, not HTML or JSON, never with Set-Cookie); restoring the client IP from CF-Connecting-IP for trusted ranges only; locking the origin (firewall, Authenticated Origin Pulls, Tunnel); 52x errors and the 125 s timeout; Matrix behind it: 8448 is not proxied, so .well-known delegation to 443, TURN stays DNS-onlyCloudflare in front of your originCDNDNSLoad balancing and CDN

🟡 Step 10 — Non-functional: reliability, security, performance, scaling