Skip to main content
Persistent connections move a project’s WebSocket traffic onto a dedicated WebSocket edge built to hold connections for days. Connections stay open through your deploys and through Pxxl’s own updates, so devices don’t all reconnect at once. Use it for EV chargers, IoT devices, trackers, live feeds, trading screens, multiplayer and anything that must stay connected. A chat or live-update feature in a normal web app doesn’t need it: plain WebSockets are enough when a reconnect every few hours is fine.

Choose an edge

Pick the edge closest to your devices. A connection is held at the edge, so a nearby edge means lower latency and fewer dropped connections on mobile networks. Each domain has its own edge, so one project can serve European devices on ws.example.com from Europe and Nigerian ones on ng.example.com from Lagos.

Turn it on

1

Open Persistent connections

Open the project, then Networking > Persistent connections > Settings.
2

Switch it on

Turn on Persistent connections. This also turns on WebSockets for the project.
3

Add a domain

Add the custom domain your devices connect to, such as ws.example.com. You can pick a domain the project already has, add a new one, or type a subdomain of a domain you bought on Pxxl.
4

Pick its edge

Choose Europe or Lagos, review, and save.
5

Set DNS if asked

Depending on where the domain’s DNS is, Pxxl either updates it for you or shows one record to set. See below.
The domain shows Waiting for DNS until the record is right, usually a few minutes, then Connected.

DNS for each kind of domain

For a domain at your own DNS provider, set: Connections stay on the old edge until DNS points at the new one, so the switch is gradual and safe.
If your DNS provider can proxy the record (Cloudflare’s orange cloud), set it to DNS only. Proxied connections are cut after about 100 seconds without traffic.

Connect from a device

Nothing changes in your app. Keep serving WebSockets on its port, and connect to the domain over wss://:
Still reconnect with a random delay when a connection closes: networks drop connections, and a random delay stops thousands of devices reconnecting in the same second. Send a small ping every 30 to 60 seconds from the device or the server, so mobile carriers and home routers don’t close an idle connection.

Usage and history

Pxxl emails you when open connections reach 80% and 100% of your allowance. Past the allowance plus 10%, new connections are refused until some close or you add more.

Turn it off

Turn off Persistent connections and the chosen domains go back to the standard edge. WebSockets keep working there, but connections close on deploys and platform updates.

Where to go next

Project networking

WebSockets, security and access rules.

Connect a domain

Add the domain your devices use.