API Maker

The backend engine for the AI era

WebSocketsEpisode 22 4:35 9 chapters November 2026

WebSockets Without a Realtime Server: Push Live Data from Your APIs

Live data for your apps from the same server as your APIs: a save, a status, pushed the moment it happens. Follow Kabir, a customer of Calm Home: one WebSocket, his orders live, a status pushed from code with emitEventWS, a rule for each subscription, and how far it scales.

In the playlists The complete course Events & realtime

Chapters

What you will learn

  • WebSocket Events: what clients may subscribe to
  • One WebSocket, on the API port
  • The shop saves an order, pushed live
  • A status pushed from code
  • A rule for each subscription
  • How far it scales: millions of clients, measured
In the docsWebSocket events
Transcript641 words · click a time to play from there

Intro

Your apps can get live data. A save or a status is pushed the moment it happens, by the same server as your APIs. In this video, we follow the app of Kabir, a customer of Calm Home. It uses one WebSocket. His orders come in live, a status is pushed from code, and one subscription is refused.

Live data, the usual way

Live data usually means extra work. You run a separate realtime server. You build publish and subscribe plumbing between it and your APIs. And it has its own way to check who a socket belongs to. With API Maker, the API port takes WebSockets too. A save, a call, or an event from your code can be pushed. And it uses the same tokens and groups as the APIs. In this video: what clients can subscribe to, a rule for each subscription, a save pushed live, a status pushed from code, and how far it scales.

What clients may subscribe to

Open APIs and Logic, then WebSockets. Nothing is pushed unless it is declared here. The saves of the MySQL orders are already here, with the provider customer_login. So a client needs a token from it. Click Add New, pick a custom event, and name it orders/status. Under Auth Providers, pick customer_login. Then write the code that decides if a client can subscribe. The customer behind the person token must be the customer asked for.

A save pushed live

Save it. Now here is the app of Kabir. It is a page with one WebSocket. It connects to the API port with the token of the shop app, and the person token of Kabir. It is connected. It subscribes to the saves of his orders, for customer five, and to orders/status for him. Both are accepted. Now the shop saves an order for Kabir. Here we do it from a terminal.

The answer is two hundred and one: it is saved. And on the screen of Kabir, the new order shows up at once. It has only the three fields his app asked for: the order number, the status, and the total.

A status pushed from code

Now we push a status from code. The custom API Announce Status finds the order, and tells its customer with g.sys.system.emitEventWS. The shop calls it, and one client is told. In the app of Kabir, we see shipped, pushed from code. Now the app asks for the status of another customer. The code says no. A customer can follow only their own orders.

How far it scales

How far does it go? The docs measured API Maker on Linode servers. Tens of thousands of clients fit on one vCPU and one gigabyte. Hundreds of thousands fit on two vCPUs. Close to a million fit on four. And millions fit on eight vCPUs and thirty two gigabytes. Each client needs a few kilobytes, so memory runs out first, never the CPU. And a message reaches its client in about a millisecond, most of the time.

Good to know

Good to know. The saves of any table, the calls of a custom or system API, and your own events can all be pushed. A subscription picks its fields, and can filter on the values of the answer. When the token of a client expires, the client is told and closed. Groups decide what it can subscribe to. And many servers share one Redis. So a save on one server reaches a client connected to another.

Built on standards

Nothing is pushed unless it is declared. It uses the same tokens and groups as every API, and your code decides for each subscription. So a live feature written by an AI assistant cannot send one customer the data of another.

Recap

To sum up. WebSockets run on the API port. Saves and events from code are pushed live. Each subscription has a rule. And millions of clients were measured. Next: schedulers, jobs without a cron server. API Maker. Build faster, spend smarter, deliver better.