Skip to content

Real-time and WebSockets · Build

Know the cost of live updates before you pick serverless

For real-time dashboards, notifications or chat, we price the WebSocket layer first. In our model, under 1,000 users most of the bill is a fixed $16.64 a month.

EngagementHourly · remote
Hours9–18 CET · 4 h overlap
StackWebSockets · API Gateway · AWS Lambda
Proof1 case study

The service in 4 parts

01 · Who it’s for

Teams building live dashboards, notifications or chat who want to know what the socket layer will cost at their current size and at the next one.

02 · What we’ve built

Both models are arithmetic on published AWS rates, not measurements of a running system. We use this arithmetic to decide between serverless and a server.

03 · How we work

01 · MODEL FIRSTWe model fixed costs, messages and connection minutes at your user count and above it, and only then choose between serverless and a server.
02 · LIMITS IN THE DESIGNAPI Gateway closes a socket after ten minutes without traffic, and every connection ends after two hours. Neither limit can be raised, so reconnection is part of the client from the first commit.
03 · WHO OWNS THE CONNECTIONThe client opens the connection and is responsible for how long it lives. The server cleans up after it: when a push returns 410 Gone, the connection record is deleted on the spot.

04 · Stack

WebSocketsAPI GatewayAWS LambdaRedisNode.js

Proof

Where we’ve done this before

All 18 case studies
Case study 05 · Marketplace2M / dayA WebSocket service on a US marketplace carrying live dashboard updates for advertisers, one-to-one notifications, forced logout and a lock that stops two admins editing the same record. The analytics behind those dashboards take in more than two million writes a day.Read the case study →WritingServerless WebSocket costs: connection minutes rarely dominateWe modeled serverless WebSockets in eighteen scenarios. With fewer than a thousand users, most of the bill is $16.64 a month for Redis and a VPC endpoint, and traffic barely changes it.Read the post →WritingServerless chat on AWS: $19 a month at 100 users, and its limitsA messaging app using Lambda and Redis behind API Gateway, modeled at seven sizes. The real ceiling is 500 new connections per second, per account and region, and only a quota increase from AWS raises it.Read the post →

FAQ

Questions about this service

It depends on your user count and fanout. In our WebSocket model, a single server is already the cheaper option at a thousand users, and a redundant pair is cheaper by five thousand. For chat in groups of fifty, one server costs less from around three hundred users.
All services47 services, most of them backed by a case study.Back to services →How we decideEach option’s five-year cost and the point where the recommendation changes.See how we decide →

Next step

Describe the problem and we’ll come back with three options.

The first call takes 30 minutes, and you’re under no obligation.

Tell us about your projectcontact@microtech.consulting