On-Premise Connectivity
Practices running Dental4Windows on-premise connect to the Dental API through a different path than cloud-hosted (Dental4Web) organisations. This page explains what’s actually happening and what it means for your integration.
How on-premise requests are routed
Cloud-hosted organisations are read directly from a hosted database. On-premise organisations don’t have a database the API can reach directly; instead, the API routes the request to Halo Connect, which relays it to an agent running at the practice and relays the result back.
How requests reach on-premise practices
Halo Connect offers two ways to run a request at the practice, and the API uses whichever suits the request.
- Short requests use Halo Connect’s immediate route and typically answer quickly. These are small, targeted requests: the reference lists (locations, practitioners and similar), reads of a single record by id, one patient’s records, one practitioner’s or one appointment book’s appointments for a day or a window of up to 32 days, cancelled appointments for up to 8 days, appointment slot search, and appointment and patient writes. Patient searches by name, mobile number or date of birth (GET Patients) and GET Patients Lite use the same route. A read on this route returns at most 1,000 rows. See Fast and Standard Routes for On-Premise Practices for the full list and the overnight rules.
- Other reads are queued at Halo Connect and are much slower, even when the result is small. That delay is built into the queued route and is not a sign of a fault at the practice.
A queued request that has not finished after about 285 seconds returns 504. The query may still complete at the practice, so a 504 does not mean nothing happened.
Writes are never repeated automatically after an unclear result, because the first attempt may have reached the practice. Send an Idempotency-Key with creates, so that a retry does not create a duplicate. See API Response Formats.
When the practice database refuses a write (for example, an appointment slot that is already taken), you receive that exact 4xx error, not a retryable error.
Limits and on-premise errors
Halo Connect limits each practice to 25 requests every 5 seconds, and also applies a daily allowance for each practice that is counted from 00:00 UTC. When the daily allowance is used up, requests for that practice return 503 with support code RP-5037, the time the allowance resets, and a Retry-After header. Retrying earlier is refused, so wait until the reset time.
| 503 | Temporarily unavailable. Retry after the time in |
| 503 | The practice database has reached its connection limit. Retry after the time in |
| 503 | The practice's daily Halo Connect allowance is used up. Wait until the reset time |
| 400 | The practice's data model does not support this request. The practice needs an upgrade, so do not retry |
What determines on-premise latency
An on-premise request has to round-trip out to the practice’s own internet connection, reach their local server, and query their local database before it can return, in a way a cloud-hosted request never does. How long that round trip takes, and how consistent it is from call to call, depends on:
- The practice’s local server hardware and configuration.
- The size of the practice’s database.
- The local database engine’s own performance.
None of this is something Centaur or the Dental API controls or can speed up from our side. On-premise requests will never be as fast or as consistent as cloud-hosted ones; that’s a property of the deployment model, not a fault condition.
On-premise requests also have a hard outer limit: Halo Connect enforces a fixed maximum execution time on the on-premise path (about five minutes), after which a query is terminated regardless of local conditions. This isn’t a number the Dental API chooses, and it can’t be extended for individual integrators; it’s a platform-level ceiling. A request that’s still running as that ceiling approaches will end in a timeout no matter how the client is configured.
The overnight backup window
There’s one specific, identifiable pattern behind a large share of on-premise slowness and failures, though not all of it (see “Not every on-premise practice behaves the same way” below).
Day to day, the practice’s local database runs via a network database server process that runs continuously, servicing both the practice’s own D4W software and API calls. This server is configured to stop for a window overnight, commonly from around 11:45pm to 6:00am, so the practice’s nightly Dental4Windows backup gets clean, exclusive access to the database file, then restart it afterwards for the day’s business. This is standard for the large majority of on-premise D4W practices.
An API call that lands while that server process is stopped forces the local database to fall back to starting a lightweight, single-connection engine just to open the database and service that one query, then shut down again once it’s done. That startup-and-shutdown cycle, not the query itself, is what drives the majority of on-premise delays and failures during that window. Depending on exactly when in the window a call lands, it can add anywhere from a few seconds to several minutes on top of the already-variable on-premise round trip.
Beyond the slowdown, there’s a data-safety consideration: a call landing during the window risks contending with a backup process that expects exclusive, uncontended access to the database file. In the worst case this can affect the integrity of that backup, which is a materially more serious outcome than a slow response. Avoid sending non-critical or bulk traffic to on-premise organisations during this window, for both reasons.
Not every on-premise practice behaves the same way
The backup-window pattern above explains most on-premise slowness and failures, but not all of it. Two practices running the identical platform, identical endpoints, and comparable or higher request volume can behave very differently: one may be reliable outside the backup window while another shows a persistently elevated failure rate spread across most or all hours of the day, including well into normal business hours, with no clear relationship to any schedule.
That second pattern is a site-specific connectivity or local-server availability issue, not a variant of the backup-window mechanism, and it isn’t something a client-side change (batching, timeout tuning, avoiding the backup window) can fully resolve. If you’re seeing it, the practice’s own internet connection or on-premise server is the place to investigate, not your integration.
Telling the two apart:
- Failures clustering tightly in the practice’s overnight backup window (commonly 11:45pm to 6:00am local time), and otherwise rare, point to the backup-window pattern above.
- Failures spread broadly across the day, including normal business hours, with no clear time-of-day boundary, point to a site-specific issue instead.
- If you operate against multiple on-premise practices, comparing failure rates across them at the same time of day is one of the fastest ways to tell which pattern you’re looking at: a shared, uniform effect across practices suggests something in the request pattern itself; an effect isolated to one practice points at that site.
Design implication
Use GET /admin/deployment-type (see Admin Resources) to determine whether you’re dealing with a cloud-hosted or on-premise organisation, since the guidance on this page only applies to the latter. Knowing an organisation is on-premise tells you to expect the latency and failure characteristics on this page; it doesn’t by itself tell you which pattern (backup window vs. site-specific) you’re dealing with.
Practical guidance
Match the call to the job
For a screen that a person is waiting on (one patient, or one day for one practitioner or appointment book), ask for exactly that. These requests take the fast route and answer quickly (see Fast and Standard Routes for On-Premise Practices). For a background job that needs many records, use date-range or bulk list parameters (from_date/to_date, mode for incremental sync) instead of thousands of single-record calls. Those calls take the standard route, so run them off-peak and outside the overnight backup window. Looping with many single requests also counts against your rate limits and the practice’s daily Halo Connect allowance.
Avoid the overnight backup window for bulk work
Schedule bulk syncs and other non-critical traffic outside the overnight backup window (commonly 11:45pm to 6:00am). Calls landing in that window are both slower and carry the data-safety consideration described above.
Cache reference data
Reference data such as practitioners, locations and payment types rarely changes. Fetch it once per run and cache it locally instead of re-fetching it inside a per-record loop; see the Caching section of Rate Limits for how the API caches reads.
Retry with backoff
On-premise failures are frequently transient: a request that fails once, especially during or near the overnight backup window, often succeeds on a retry a short time later. Retrying with backoff, rather than surfacing the failure immediately, resolves a meaningful share of on-premise failures without any other change.
Size your client timeout generously
Successful on-premise responses can legitimately take much longer than a typical cloud-hosted call, particularly for calls landing near the overnight backup window. A client timeout set too aggressively will cut off requests that were on track to succeed, producing a “failure” that the API itself never actually returned. Set your client timeout to 60 seconds for requests that take the fast route and to at least 300 seconds for all other on-premise requests, and for every on-premise request overnight (120 seconds for cloud-hosted practices). Treat a timeout as inconclusive rather than a confirmed error: a fast request that reaches 60 seconds may have fallen back to the standard route, so retry a read with the longer timeout. Do not resend a write after a timeout without checking whether it was saved, or use an Idempotency-Key on creates. See Fast and Standard Routes for On-Premise Practices for which requests take the fast route.
Summary
On-premise latency is a property of the deployment model: the request has to reach a practice’s own internet connection, server, and database, none of which the API controls, and it can be materially worse if a call lands during the overnight backup window. Not every on-premise practice behaves the same way; a failure pattern spread broadly across the day points to a site-specific issue rather than the backup window. Design for it: match the call to the job (targeted requests for what a person is waiting on, date ranges for background jobs), avoid sending non-critical or bulk traffic during the backup window, retry transient failures with backoff, and size client timeouts generously above your cloud-hosted defaults.
On this page
- On-Premise Connectivity