Skip to content

Commit 912c596

Browse files
dsshimelclaude
andcommitted
add async consumer blocks to message queue stage in scaling sim
Adds internal tools, observability dashboards, aggregated statistics, and debug logs outside the data center pointing to databases — motivates why async message queue events are useful beyond the main request path. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 0cdaa6a commit 912c596

File tree

1 file changed

+46
-3
lines changed

1 file changed

+46
-3
lines changed

attendabot/frontend/src/simulations/scalingData.ts

Lines changed: 46 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -689,7 +689,7 @@ export const scalingFrames: ScalingFrame[] = [
689689
id: "message-queue",
690690
title: "Message Queue + Workers",
691691
description:
692-
"Some operations are too slow or resource-intensive to handle synchronously in a web request — sending emails, processing images, generating reports, running ML models. A message queue (like RabbitMQ, Kafka, or SQS) decouples producers (web servers) from consumers (workers). The web server publishes a task to the queue and immediately responds to the user. Worker processes pick up tasks from the queue and process them asynchronously. This makes the system more loosely coupled and failure resilient — if a worker crashes, the message stays in the queue and gets picked up by another worker.",
692+
"Some operations are too slow or resource-intensive to handle synchronously in a web request — sending emails, processing images, generating reports, running ML models. A message queue (like RabbitMQ, Kafka, or SQS) decouples producers (web servers) from consumers (workers). The web server publishes a task to the queue and immediately responds to the user. Worker processes pick up tasks from the queue and process them asynchronously. This makes the system more loosely coupled and failure resilient — if a worker crashes, the message stays in the queue and gets picked up by another worker. Beyond the main application, async events also power internal tools, observability dashboards, aggregated statistics, and debug logs — all of which need to talk to the database without blocking user-facing requests.",
693693
changeSummary:
694694
"Add a message queue for async processing — web servers publish, workers consume.",
695695
nodes: [
@@ -728,7 +728,7 @@ export const scalingFrames: ScalingFrame[] = [
728728
},
729729
{
730730
id: "servers",
731-
label: "Web Servers",
731+
label: "Servers",
732732
icon: "\uD83D\uDDA5\uFE0F",
733733
color: "#4ade80",
734734
x: 25,
@@ -780,6 +780,38 @@ export const scalingFrames: ScalingFrame[] = [
780780
y: 70,
781781
group: "dc",
782782
},
783+
{
784+
id: "internal-tools",
785+
label: "Internal\nTools",
786+
icon: "\uD83D\uDEE0\uFE0F",
787+
color: "#7dd3fc",
788+
x: 15,
789+
y: 92,
790+
},
791+
{
792+
id: "monitoring",
793+
label: "Observability\nDashboards",
794+
icon: "\uD83D\uDCCA",
795+
color: "#86efac",
796+
x: 38,
797+
y: 92,
798+
},
799+
{
800+
id: "agg-stats",
801+
label: "Aggregated\nStatistics",
802+
icon: "\uD83D\uDCC8",
803+
color: "#fde68a",
804+
x: 61,
805+
y: 92,
806+
},
807+
{
808+
id: "debug-logs",
809+
label: "Debug\nLogs",
810+
icon: "\uD83D\uDC1B",
811+
color: "#fca5a5",
812+
x: 84,
813+
y: 92,
814+
},
783815
],
784816
groups: [
785817
{ id: "dc", label: "Data Center", x: 2, y: 22, width: 90, height: 58 },
@@ -795,8 +827,19 @@ export const scalingFrames: ScalingFrame[] = [
795827
{ from: "servers", to: "db" },
796828
{ from: "servers", to: "cache" },
797829
{ from: "workers", to: "db" },
830+
{ from: "internal-tools", to: "db" },
831+
{ from: "monitoring", to: "db" },
832+
{ from: "agg-stats", to: "db" },
833+
{ from: "debug-logs", to: "db" },
834+
],
835+
newNodeIds: [
836+
"mq",
837+
"workers",
838+
"internal-tools",
839+
"monitoring",
840+
"agg-stats",
841+
"debug-logs",
798842
],
799-
newNodeIds: ["mq", "workers"],
800843
},
801844

802845
// ── Frame 11: Database Sharding ──

0 commit comments

Comments
 (0)