Compare

Foony vs Amazon API Gateway WebSockets

AWS’s WebSocket front door against a realtime platform: what you build on connection IDs versus what channels give you.

API Gateway WebSocket APIs terminate sockets and route frames to Lambda or other backends. There are no channels, no fanout, and no state: you store connection IDs and broadcast by calling the management API once per connection. That makes it a very flexible pipe, and a lot of assembly.

When Foony fits

  • Fanout is the product. On API Gateway, broadcasting to 10,000 users means 10,000 @connections API calls your code orchestrates, typically with DynamoDB bookkeeping. On Foony it is one publish.
  • Connections that last. API Gateway closes every socket after 2 hours and idles out at 10 minutes, so clients live in reconnect loops. Foony holds connections with keep-alive pings.
  • Presence, history, ordering, and reconnect recovery exist. API Gateway has none of them, its developer guide does not even document delivery guarantees.
  • Message sizes: API Gateway frames cap at 32 KB with 128 KB per message, and billing rounds every 32 KB into another message unit.
  • Reconnect storms are not a quota problem. API Gateway defaults to 500 new connections a second per account per region.

When Amazon API Gateway WebSockets fits

  • Everything else is already AWS: IAM auth on $connect, Lambda handlers, CloudWatch, and compliance inheritance.
  • True pay-per-use at tiny scale: a low-traffic internal tool can cost single-digit dollars a month.
  • You want a custom protocol over the socket and full control of what every frame means.

Features

FoonyAmazon API Gateway WebSockets
FanoutOne publish reaches every subscriberOne @connections API call per recipient, orchestrated by your code
PresenceBuilt in, with automatic re-entry on reconnectNone, track connection IDs in DynamoDB yourself
HistoryPer-prefix channel rules, up to 30 daysNone
Connection lifetimeHeld open with keep-alive pings2 hours maximum, 10 minute idle timeout
DeliveryEffectively exactly once (idempotent publish, client dedup)Not documented

Limits and pricing

FoonyAmazon API Gateway WebSockets
Pricing modelPer message, in and out$1 per million messages (32 KB increments) plus $0.25 per million connection minutes
Message size64 KB free, up to 1 MB on paid plans128 KB per message, 32 KB per frame
New connectionsPlan message rate is the only meter500/second per account per region by default
Free tier9M messages/month, 300 concurrent connections, free forever1M messages and 750k connection minutes, first 12 months only

Competitor numbers last checked July 2026. If something has drifted, tell us and we will fix it.

Moving over

Moving off API Gateway usually deletes code: the DynamoDB connection table, the fanout loop, and the reconnect handling all disappear into channel subscribe and publish. Lambda handlers that produced messages keep working, publishing over Foony’s REST API instead of the @connections endpoint.

Try it on the free tier

9M messages a month, presence, history, and the Pusher-compatible API are all on the free plan. No card required.