diff --git a/docs.json b/docs.json index f9d7ceccf..55f1dc386 100644 --- a/docs.json +++ b/docs.json @@ -146,6 +146,7 @@ "fundamentals/implementation-checklist", "fundamentals/key-concepts", "fundamentals/network-allowlist", + "fundamentals/architecture-and-benchmark", { "group": "Features", "pages": [ diff --git a/fundamentals/architecture-and-benchmark.mdx b/fundamentals/architecture-and-benchmark.mdx new file mode 100644 index 000000000..894bae630 --- /dev/null +++ b/fundamentals/architecture-and-benchmark.mdx @@ -0,0 +1,122 @@ +--- +title: "Architecture & Benchmark" +sidebarTitle: "Architecture & Benchmark" +description: "How CometChat holds millions of concurrent connections, and how we measure it." +canonical: "https://www.cometchat.com/docs/fundamentals/architecture-and-benchmark" +--- + +This page explains how the CometChat platform is built to scale, and shares the results of our November 2026 benchmark. In that test, the platform held 5 million concurrent connections for 60 minutes, behind a global edge network of 4,000 points of presence (PoPs). + +| November 2026 benchmark | Result | +| --- | --- | +| Simultaneous connections | 5,000,000, held for 60 minutes with zero message loss | +| Messages delivered at peak | 20 million a second | +| Messages delivered across the test | 10 billion+ | +| P90 response time | 45 ms | +| P95 response time | 60 ms | +| P99 response time | 110 ms | + +## Architecture overview + +CometChat is built the way large enterprise platforms are built: in tiers that each do one job and scale on their own. That is how the platform holds millions of open connections while messages keep moving. The platform runs as redundant microservices: if one instance goes down, another picks up its work, so the service keeps running. + +CometChat platform architecture at 5 million connections: users connect through the global edge to the connection, messaging, fan-out and data tiers, and deliveries go back to every recipient. +CometChat platform architecture at 5 million connections: users connect through the global edge to the connection, messaging, fan-out and data tiers, and deliveries go back to every recipient. + +*Conceptual view of the platform at 5 million connections. Figures are from the November 2026 benchmark.* + +1. **Connect.** Users reach CometChat through the global edge network. +2. **Hold.** The connection tier keeps every connection open. +3. **Process.** The messaging tier handles and routes each message. +4. **Fan out.** One message becomes a delivery for every recipient. +5. **Deliver.** Deliveries go back out to every connected user. + +Across the platform: high-availability deployments, encryption in transit and at rest, and a 99.999% uptime SLA available. + +### Benchmark at a glance + +**5 million connections, held for 60 minutes.** Five million concurrent WebSocket connections stayed open for 60 minutes. At peak, 4 messages a second each reached all 5 million connections: 20 million messages delivered a second. Across the test, more than 10 billion messages were delivered. + +Messaging response time at 5 million connections, over 60 minutes at peak concurrency: + +| Measure | Response time | +| --- | --- | +| Average | 30 ms or less | +| P90 | 45 ms | +| P95 | 60 ms | +| P99 | 110 ms | + +### What this means for your product + +- **5 million** users online at the same moment, each holding a live connection. +- **Zero** messages lost during the hour at peak load. + +## How CometChat scales + +Six design choices let the platform grow without being rebuilt. + +1. **Scale out, not up.** Services are stateless, so capacity is added by adding more of them, not by re-architecting. +2. **Separate the jobs.** Holding connections and processing messages are different tiers, and each scales independently. +3. **Meet users at the edge.** 4,000 points of presence keep the network close to users, for fast delivery. The same edge provides traffic protection before requests reach the platform. +4. **Fan out once, centrally.** A dedicated tier turns one message into a delivery for every recipient. +5. **Keep every message in order.** Messages pass through a durable event log, which preserves their order and prevents loss. +6. **Plan for failure.** Services run in high-availability deployments, and clients reconnect automatically after a network drop. + +### Edge network + +The edge network's 4,000 PoPs sit in front of the platform. They provide traffic protection and network delivery, and they cache content where it is eligible. Messages are never served from a cache: every message is authenticated and handled by the platform itself. + +### Real-time connections + +Each logged-in client keeps a persistent WebSocket connection to a gateway in the connection tier. That connection carries messages, typing indicators, receipts and presence. It opens at login and reconnects automatically after a network drop. The connection tier holds the connections, and the messaging tier processes and routes the messages. + +## Enterprise readiness + +| Area | What you get | +| --- | --- | +| Uptime | A signed 99.999% uptime SLA is available as an add-on. | +| Compliance | ISO 27001:2022 and SOC 2 Type 2. Also GDPR, HIPAA + BAA, CCPA/CPRA and PIPEDA. Data is encrypted in transit and at rest. | +| Deployment | Run on CometChat's managed cloud, a dedicated deployment, or your own infrastructure. | +| Transparency | [status.cometchat.com](https://status.cometchat.com/) shows live status and 90-day uptime for each component. | + +## Benchmark + +In November 2026, we ran a full-scale benchmark on CometChat's managed cloud. We opened 5 million concurrent WebSocket connections, held all of them for a full hour, and measured how quickly messages were handled and delivered at that load. + +### How the test ran + +Open connections during the test: a ramp-up to 5 million at 10,000 new connections a second, then a 60-minute hold. +Open connections during the test: a ramp-up to 5 million at 10,000 new connections a second, then a 60-minute hold. + +1. **Ramp up: 10,000 new connections a second.** At that rate, 5 million connections take a little over 8 minutes to open. +2. **Hold: 60 minutes at 5 million.** Every connection stayed open for the full hour. +3. **Deliver: 20 million messages delivered a second.** At peak, 4 messages a second went to all 5 million connections. + +The ramp-up time is worked out from the connection rate: 5 million connections at 10,000 a second take 8 minutes 20 seconds. + +### Setup and results + +| Measure | Result | +| --- | --- | +| Peak concurrent connections | 5 million | +| Connection ramp-up | 10,000 new connections per second | +| Time at peak | 60 minutes | +| WebSocket heartbeats | 1.2 billion | +| Message rate at peak | 4 messages per second, delivered to all 5 million connections | +| Peak delivery rate | 20 million messages per second | +| Messages delivered across the test | 10 billion+ | +| Average response time | 30 ms or less | +| Message loss | Zero | + +### Large-audience fan-out + +A publisher sends 4 messages per second to the fan-out layer, which delivers each one to all 5 million connected recipients. +A publisher sends 4 messages per second to the fan-out layer, which delivers each one to all 5 million connected recipients. + +*4 messages per second × 5 million recipients = 20 million messages delivered per second.* + +Fan-out is the work of turning one sent message into a delivery for every recipient. Delivery peaked at 20 million messages a second, and more than 10 billion messages were delivered across the test. + +## Related + +- [System Status](https://status.cometchat.com/) diff --git a/images/architecture-and-benchmark-architecture-dark.svg b/images/architecture-and-benchmark-architecture-dark.svg new file mode 100644 index 000000000..e6855fba0 --- /dev/null +++ b/images/architecture-and-benchmark-architecture-dark.svg @@ -0,0 +1,103 @@ + + CometChat platform architecture at 5 million connections + Users connect through a global edge network of 4,000 points of presence to the CometChat platform. Inside the platform, a connection tier, a messaging tier and a fan-out tier each scale out independently, backed by a data tier. Deliveries flow back to every recipient. High availability, encryption and an uptime SLA apply across the platform. + + + + + Connected users + Web and mobile apps + + + + 5,000,000 + open connections + + + + Global edge + Traffic protection + Eligible caching + Network delivery + + 4,000 + points of presence + + + + CometChat platform + Each tier scales independently + + Connection tier + Holds every open connection + + scales out + 10,000/sec + new connections accepted + + Messaging tier + Processes and routes every message + + scales out + 60 ms + P95 response time + + Fan-out tier + One delivery for every recipient + + scales out + 20M/sec + messages delivered + + Data tier + Distributed storage and caching + + + Across the platform + + High-availabilitydeployments + + Encrypted in transitand at rest + + 99.999% uptime SLAavailable + + + + + + + + + 12345 + Delivered to every recipient + \ No newline at end of file diff --git a/images/architecture-and-benchmark-architecture-light.svg b/images/architecture-and-benchmark-architecture-light.svg new file mode 100644 index 000000000..f01d0ffe8 --- /dev/null +++ b/images/architecture-and-benchmark-architecture-light.svg @@ -0,0 +1,103 @@ + + CometChat platform architecture at 5 million connections + Users connect through a global edge network of 4,000 points of presence to the CometChat platform. Inside the platform, a connection tier, a messaging tier and a fan-out tier each scale out independently, backed by a data tier. Deliveries flow back to every recipient. High availability, encryption and an uptime SLA apply across the platform. + + + + + Connected users + Web and mobile apps + + + + 5,000,000 + open connections + + + + Global edge + Traffic protection + Eligible caching + Network delivery + + 4,000 + points of presence + + + + CometChat platform + Each tier scales independently + + Connection tier + Holds every open connection + + scales out + 10,000/sec + new connections accepted + + Messaging tier + Processes and routes every message + + scales out + 60 ms + P95 response time + + Fan-out tier + One delivery for every recipient + + scales out + 20M/sec + messages delivered + + Data tier + Distributed storage and caching + + + Across the platform + + High-availabilitydeployments + + Encrypted in transitand at rest + + 99.999% uptime SLAavailable + + + + + + + + + 12345 + Delivered to every recipient + \ No newline at end of file diff --git a/images/architecture-and-benchmark-fan-out-dark.svg b/images/architecture-and-benchmark-fan-out-dark.svg new file mode 100644 index 000000000..7d32d1fae --- /dev/null +++ b/images/architecture-and-benchmark-fan-out-dark.svg @@ -0,0 +1,55 @@ + + How fan-out turns 4 messages a second into 20 million messages delivered a second + A publisher sends 4 messages per second to the fan-out layer, which delivers each one to all 5 million connected recipients. + + + Publisher + 4 messages per second + + + Fan-out layer + One delivery per recipient + + + + + + + + + + + + + 5 million connected recipients + \ No newline at end of file diff --git a/images/architecture-and-benchmark-fan-out-light.svg b/images/architecture-and-benchmark-fan-out-light.svg new file mode 100644 index 000000000..7eb59d38d --- /dev/null +++ b/images/architecture-and-benchmark-fan-out-light.svg @@ -0,0 +1,55 @@ + + How fan-out turns 4 messages a second into 20 million messages delivered a second + A publisher sends 4 messages per second to the fan-out layer, which delivers each one to all 5 million connected recipients. + + + Publisher + 4 messages per second + + + Fan-out layer + One delivery per recipient + + + + + + + + + + + + + 5 million connected recipients + \ No newline at end of file diff --git a/images/architecture-and-benchmark-ramp-up-dark.svg b/images/architecture-and-benchmark-ramp-up-dark.svg new file mode 100644 index 000000000..23549282e --- /dev/null +++ b/images/architecture-and-benchmark-ramp-up-dark.svg @@ -0,0 +1,47 @@ + + Open connections during the benchmark + Connections climb from zero to 5 million in a little over 8 minutes, at 10,000 new connections a second, then stay at 5 million for 60 minutes. + + + 01M2M3M4M5M + 010203040506070 + Minutes from the start of the test + + + + + Ramp-up + 10,000 new connections a second + Hold: 5 million connections for 60 minutes + + \ No newline at end of file diff --git a/images/architecture-and-benchmark-ramp-up-light.svg b/images/architecture-and-benchmark-ramp-up-light.svg new file mode 100644 index 000000000..c0361cb35 --- /dev/null +++ b/images/architecture-and-benchmark-ramp-up-light.svg @@ -0,0 +1,47 @@ + + Open connections during the benchmark + Connections climb from zero to 5 million in a little over 8 minutes, at 10,000 new connections a second, then stay at 5 million for 60 minutes. + + + 01M2M3M4M5M + 010203040506070 + Minutes from the start of the test + + + + + Ramp-up + 10,000 new connections a second + Hold: 5 million connections for 60 minutes + + \ No newline at end of file