App backend reliability
This page is for owners and product managers whose app, customer portal or partner integration depends on an Exponential installation, and for the administrators who keep it running. When the website is slow, visitors notice; when the API behind an app fails, the app looks broken in every customer's pocket. This page lists what can make the back end unavailable, what Exponential provides against each risk, and what the app itself must do.
Contents
- What can make the API unavailable
- Watching it: health checks
- Planned work: maintenance windows
- Load: caching, limits and scaling
- Credentials that stop working
- What the app must do
- Reliability checklist for an app back end
What can make the API unavailable
| Cause | What helps | Read |
|---|---|---|
| The server process stopped | Velocity's watchdog restarts the engine; monitoring alerts | Health checks and uptime |
| Planned maintenance | Maintenance mode answers 503 with Retry-After | below |
| Too many requests | Caching, rate limits per key, more capacity | below |
| An expired or revoked credential | Key lifetimes and the API keys overview | below |
| A changed server configuration | The Authorization header must still reach PHP | REST API v1 and v2 for applications |
| An upgrade that changed answers | Release notes; for the REST API in 6.0.15 the answers stayed "byte for byte the same" | REST API v1 and v2 for businesses |
The reliability section covers the platform as a whole (Reliability); this page adds what is specific to apps.
Watching it: health checks
From Health checks and uptime:
- Check from outside: the public site, and the administration login page, because the front page "is often served from a cache ... so it can answer while the database is down". A page whose content you can check is stronger than a status code.
- On the server:
./console exp:systeminfo --jsonexits 1 when a health check fails; status commands with exit codes suit automated checks. - Under Velocity: the endpoint
/Q/healthanswers{"status":"ok"}when the server process answers; "it does not render a page of the site, so keep the external page checks as well". The watchdog starts the engine again after a crash and backs off after three failed starts in a row.
For an app, add one more check: an authenticated API request with a monitoring key that may only read one small
public item, for example GET /api/ezp/v1/content/node/<id>. It proves the REST routes, authentication and the
database together.
Planned work: maintenance windows
While maintenance mode is on, the REST API (index_rest.php) answers with the maintenance page and status 503, like
the site (Maintenance mode guide). The responses carry Retry-After with the
seconds until the expected end (Planned maintenance is not an outage).
For an app that means: treat a 503 with Retry-After as "come back later", show a friendly message, and retry after
the given time. Announce windows to partners who integrate with you.
Note
"Maintenance never ends by itself when the expected time passes." Alert when a window lasts longer than announced.
Load: caching, limits and scaling
| Lever | Effect | Source |
|---|---|---|
| The REST answer cache | Repeated reads answered from cache; cleared with the content tag | Headless Exponential |
| Caching in the app or a CDN, purged on publish | Fewer requests reach the server | same |
| Paged lists with limits | No request fetches everything | same; expservices pages at most 200 items |
| Rate limit per API key | 120 requests per key and minute by default, counted in APCu; not enforced without APCu | Personal API keys |
| Velocity and its persistent workers | The application stays warm between requests | Scaling applications |
| Several web servers | Horizontal capacity, with shared storage and one database | Scaling applications |
Ask your developers to measure before scaling: the app creators' guide starts with "Measure first".
Credentials that stop working
Personal API keys expire (365 days at most by default) and end when their owner is disabled; OAuth tokens expire after their lifetime (one hour by default) and are renewed with a refresh token (Apps and API keys). A forgotten expiry date is a self-inflicted outage:
- put every key's end date in the operations calendar;
- check Setup > oAuth admin > API keys for keys "expiring within seven days";
- never let an integration run under a person's account that may be disabled when they leave.
What the app must do
Write these into the app's requirements:
- To do: Show cached content when the API does not answer, with a note that it may be out of date.
- To do: Treat 503 with
Retry-Afteras a planned pause; retry with growing intervals, not in a tight loop. - To do: Treat 401 as "credential expired or revoked": refresh the token, or ask the user to sign in again.
- To do: Treat 403 as "not allowed", not as an error to retry.
- To do: Respect rate limits; batch and page requests.
- To do: Send every request over HTTPS.
- To do: Log failures with time and status so support can match them with the server's logs (Finding an error by its reference).
Reliability checklist for an app back end
- To do: External monitoring of the site, the administration login and one authenticated API read.
- To do: Velocity's watchdog installed, if Velocity serves the site.
- To do: Maintenance windows announced to app users and partners; the app handles 503.
- To do: Rate limits configured, and APCu available where they must be enforced.
- To do: Key and token expiry dates in the calendar; one credential per app and partner.
- To do: Backups restored in a drill, so a restore of the back end is a known procedure (Restore drills).
- To do: An incident contact for the app team and for the server team (Incident response for small teams).
Related pages
- Headless with the REST API
- Mobile checklist
- Health checks and monitoring
- Maintenance mode and planned work
- Health checks and uptime
- Free documentation: this page is free to copy, translate and improve under the GNU FDL 1.3.
Become an Exponential Partner
Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.