Jump to content

Stable URLs on PMSS

From Pulsed Media Wiki


Every active Pulsed Media seedbox and storage box has a permanent hostname under mcx.fi that points to your service and follows it when we move it to a different server. Bookmark it, put it in a webhook, use it as an API base — it does not change when your underlying server does.

The hostname is a short hash label, so it carries no username and no account number in the address. You can compute your own from your service ID; nothing has to be looked up or requested.

The two forms

Form Looks like Points to
Service URL (one per service) {hash}.mcx.fi the single server your service runs on
Cluster URL (accounts with 2+ services) {hash}.mcx.fi all of your servers, in round-robin

Both are live in DNS today. What gets served at the hostname is your public web folder — see web hosting below.

Service URL — one stable hostname per service

Each active service has its own hostname built from its service ID. The label is the first 16 hex characters of a SHA-256 hash:

label = first 16 hex chars of  sha256("mcx.fi:service:<your service ID>")
url   = <label>.mcx.fi

The service ID is the number in your client area product page URL — clientarea.php?action=productdetails&id=<service ID>. Compute your hostname on any machine with sha256sum:

printf 'mcx.fi:service:12345' | sha256sum | cut -c1-16
# -> a hex label; your URL is <label>.mcx.fi

Replace 12345 with your own service ID. The hash uses no secret — the same input always gives the same label — so your URL is stable for the life of the service. When we migrate your service to another server, the record updates to the new server's address automatically; the hostname stays the same.

Cluster URL — round-robin across your servers

If your account has two or more services on different servers, you also get one cluster hostname built from your client ID:

label = first 16 hex chars of  sha256("mcx.fi:customer:<your client ID>")
url   = <label>.mcx.fi

This hostname carries an address record for each of your servers. DNS hands them out in rotating order, so requests spread across your servers — a simple round-robin. If you run the same content on each of your boxes (mirrored downloads, a static site copied to every server, a set of API endpoints), one cluster URL distributes visitors across all of them without any load balancer.

This is plain round-robin DNS, not a health-checked load balancer and not an edge CDN. There is no failover: a server that is temporarily down stays in the rotation until it is removed on a later rebuild. It spreads load; it does not detect outages.

Accounts with several services also get a readable form of the same cluster URL, {account-name}-{client ID}.mcx.fi, pointing at the same addresses. It is easier to share than the hash, but it contains your account name, so it is not anonymous. Use the hash form above if you would rather keep your name out of the address.

What gets served at these hostnames

The hostname resolves to the server your service runs on. On a server running the current Pulsed Media platform, it serves your public web folder, ~/www/public/ — the same content as your per-user web hosting. So a file at ~/www/public/report.pdf is reachable at http://<label>.mcx.fi/report.pdf.

These hostnames serve over plain HTTP. A browser opening https:// on them will warn, because the server's TLS certificate is issued for its own hostname, not for the mcx.fi label. For an HTTPS link today, use your server's own hostname.

Why the hostname is stable

The label comes from your service ID, which never changes, so the hostname is permanent. The address behind it is rebuilt from live account data, so it tracks reality: a migration to new hardware updates the address, a cancelled service drops out. The records carry a long time-to-live (about a day), so after a migration it can take up to a day for every resolver to see the new address. The trade-off is deliberate — the URL is meant to be stable, not instant.

Privacy

The hostname is a hash label, so your username is not in the address. On the billing side, only the hash and the IP are ever published to DNS — your service ID, client ID, and username stay on our systems and are never sent out. The hash is computable rather than secret: anyone who knows a service ID can derive its label, and the address it points to is public DNS like any hostname. Treat these URLs as public links, not as private ones.

Included with every service

A stable URL comes with every active seedbox and storage box at no extra cost, on the same PMSS platform that runs the fleet. Put a file in ~/www/public/, hand out the mcx.fi link, and it keeps working when your service moves.

See also