Why Medplum rate limits matter for a self-hosted FHIR API
Rate limits and FHIR interaction quotas control how many requests each caller can send to a Medplum server in a given period, and how heavy those requests are allowed to be. On a self-hosted Medplum, the FHIR API, Bots and user traffic all share the same application servers, PostgreSQL database and Redis cache. One noisy caller can slow every other caller, so these controls decide whether an EHR sync job, a Bot or a clinician working in the web app gets the capacity it needs during a busy period.
Teams usually need to set them once more than one thing talks to the server. Typical triggers are several integrations writing to the same project, a bulk load of historical records, a Bot that loops over a large set of resources, or a shared project used by several business units. A single search that returns a large result set can cost far more than a single read, so a count of requests alone may not describe the load. Before you change anything, confirm which callers you have, their peak periods and which of them must never be throttled, such as a clinical workflow that depends on low latency.
The research behind this page does not include the rate limit configuration reference, so the exact configuration keys, their defaults and the weighting rules must be confirmed in the Medplum self-hosting documentation at Medplum self-hosting and in the configuration file or environment of the server version you run. Check the defaults on a test environment first, and record the values you set so that an upgrade does not change them silently.
How a request passes rate limit checks before reaching FHIR
The request starts at a client or integration outside the server network, crosses the trust boundary, and reaches the load balancer and then a Medplum app server. The app server runs the rate limit check before the FHIR handler touches PostgreSQL. If the request is within its limit, it proceeds to the handler. If the limit is exceeded, the server returns HTTP 429 and the FHIR handler never runs. Counter storage is shown as Redis, the cache component named in Medplum's documentation. Before relying on this flow, confirm in the Medplum docs and your own tests whether counters are held in Redis and whether limits apply per app server or are shared across the fleet.
Request path from client to FHIR handler, with the 429 branch and trust boundary.
Which rate limit setting fits each caller
This table compares the five control layers that can limit traffic to a self-hosted Medplum server, from server-wide defaults to client credentials used by integrations. Read each row to match a caller type to the layer that governs it, who can change that layer, and what it costs in blocked legitimate work. Confirm current defaults and setting names in the configuration reference for your Medplum version before you change anything.
| Control layer | What it limits | Who sets it | When it fits | Main trade-off |
|---|---|---|---|---|
| Server-wide defaults | Request rate and weighted FHIR interaction quota applied to every project unless overridden | Super admin, through server configuration | Baseline protection against runaway clients and accidental load across the whole deployment | Broad protection, but a low default can block legitimate bulk imports and sync jobs in every project |
| Project-level overrides | Rate and quota limits for all traffic within one project | Super admin or project admin, depending on the setting | Projects with known workload profiles, such as a high-volume intake project or a sandbox with stricter limits | Tailoring per project adds configuration to review, and a generous override weakens the baseline for that tenant |
| User-level overrides | Limits applied to a specific user or login identity | Project admin, or super admin for restricted settings | A single integration user or staff account needs a higher allowance for a planned batch task | Targeted relief keeps other users protected, but overrides outlive the task unless someone removes them |
| Bot and Subscription traffic | Requests generated by server-side Bots and Subscription-triggered executions | Project admin for Bot configuration, super admin for platform-wide limits | Automations that fan out many FHIR writes or reads per trigger, such as bulk updates after an import | Protects the server from event storms, but a throttled Bot can delay downstream clinical workflows |
| Client credentials used by integrations | Traffic from external systems authenticating with client credentials or other machine identities | Project admin when creating the client, with limits set at project or user level | Interface engines, data pipelines and devices that run on fixed schedules and send steady volume | Predictable clients are easy to size, but a shared credential across several systems makes it hard to tell which system caused a spike |
How weighted FHIR quotas count expensive interactions
A raw request count treats a single patient lookup and a bulk export as the same unit of load, which they are not on a shared server. The cards below cover the request types most likely to consume disproportionate database, cache and worker capacity, and what to confirm about how your Medplum version weights each one.
Searches with large result sets
A search that returns many resources or pulls in _include and _revinclude targets does far more database work than a single read, even though it is one HTTP request. Broad searches on common parameters can scan large indexes and return pages that are expensive to serialize. Before setting a quota, list the search patterns your applications run most often and check whether your Medplum version applies a higher weight to searches that return many results or includes. Test with your own query mix, not a generic sample.
GraphQL queries with nested selections
A GraphQL request can ask for several resource types and nested references in one call, so its cost depends on the shape of the selection set rather than on the number of requests. A query that looks small in a client can fan out into many database reads on the server. Ask your team which GraphQL operations run in production and how deeply they nest. Confirm with Medplum how GraphQL requests are weighted in the version you run, and whether that weight reflects the actual work performed.
Batch and transaction bundles
A single bundle can contain dozens or hundreds of entries, and a transaction bundle must complete all of them atomically, which holds locks and extends work across the whole set. Bundles are often used for data migration and bulk loading, so a quota that treats them as one request may let a load job starve interactive users. Decide which integrations are allowed to submit bundles, how large they may be, and whether they should run in a separate project or during off-peak windows. Confirm how your version weights bundle entries.
Writes that trigger Subscriptions and Bots
A small write can cause a chain of follow-on work: a Subscription fires, a Bot runs, and the Bot writes back to the repository. The request that caused the chain is cheap to count but expensive to serve, and a runaway Bot can multiply load quickly. Map which resource types have active Subscriptions and Bots so you can see where one write produces many downstream operations. Confirm whether the quota counts the triggered work against the originating caller or only the direct request.
Binary uploads and downloads
Binary resources carry payloads that can be large, such as scanned documents, images or device files, and their cost tracks byte volume and storage I/O rather than resource count. A few large uploads can use more bandwidth and storage throughput than thousands of small reads. Identify which clients upload binaries, their typical file sizes and how often they retry. Confirm whether your Medplum version weights binary traffic separately and whether size limits are enforced at the load balancer, the application or both.
Confirming weights before go-live
Weights are a product setting, so the weight for each interaction type can change between Medplum versions, and the defaults may not match your traffic. Before you rely on a quota, record the Medplum version you run, read its rate limit documentation, and compare each weight against the request types in your inventory. Ask your partner or vendor to explain any interaction type you cannot match to a documented weight. Repeat this check at each upgrade, because the weighting may change with the release.
Versions and release policySetting rate limits and quotas on a self-hosted Medplum
This sequence takes a self-hosted Medplum from an unmeasured set of callers to tuned server defaults, project and user overrides, Bot and integration quotas, and a verified 429 response path. Each step ends with a check so the team knows the control works before callers depend on it.
Inventory callers and their FHIR interaction mix
The platform team, with the integration owners, lists every caller that reaches the Medplum API: user-facing apps, Bots, Subscriptions consumers, the Medplum Agent, batch loaders and reporting jobs. For each caller, record the client ID or project, the FHIR interactions it uses (reads, searches, creates, updates, batch and transaction bundles) and the typical peak request rate. Use load balancer or application logs from a representative period, or a controlled test run if no history exists. The output is a table of callers ranked by expected load. Check: every caller in the integration register appears in the table, and each row has a measured or estimated peak with its source noted.
Confirm the Medplum version and its rate limit reference
The team records the exact Medplum server version in production and in staging, then reads the rate limit configuration reference for that version in the Medplum documentation and release notes. Confirm which settings exist, their names, default values, how weighted FHIR quotas are expressed, and whether any behavior changed between the version in use and the latest release (5.2.5 at research time). Confirm the install method (AWS with CDK, Kubernetes, Docker, Ubuntu or source) because it determines how configuration reaches the running server. Check: a written note lists the version, the configuration keys you intend to change and the install method, all confirmed against that version's documentation.
Set server defaults in deployment configuration
The platform engineer sets the server-wide rate limit defaults in the deployment configuration that your install method uses, keeping values in version control with the rest of the deployment. Choose defaults that cover your lowest-priority caller comfortably and leave headroom for known peaks, rather than copying a value from another deployment. Record the reason for each value next to it. Changes to server configuration require a restart or redeploy in your chosen install method, and you should confirm the exact procedure for that method with Medplum's self-hosting documentation before rolling out. Check: the change is merged, deployed to staging and visible in the running server's effective configuration.
Apply project and user overrides
A project administrator, working through the admin tools available to your deployment, applies overrides for callers that need different limits than the server default. Typical candidates are a high-volume integration project or a single service account that legitimately makes bulk reads. Keep overrides few and documented, with the owner and reason stored alongside each one, so the default remains the rule. Check: a test request from the overridden caller shows the new limit applied, and a request from an unrelated user in the same project still receives the default.
Set quotas for Bots and integration clients
Bots, Subscriptions consumers and integration clients often generate bursts that are harder to predict than interactive users. For each one, set a quota that reflects its agreed interaction mix, using the weighted FHIR quota settings for your Medplum version, so that expensive operations such as large searches consume more of the budget than simple reads. Decide what each client should do when limited: retry with backoff, queue, or fail the job and alert. Check: a test Bot or integration client reaches its quota in a controlled run, and its own logs show the expected handling of the rejection.
Enable and review the rate limits dashboard
The observability owner enables the rate limits dashboard for the deployment, confirming first which metrics your version exposes and where they come from. Add panels for requests limited per caller, the share of quota consumed by each project, and any callers that repeatedly hit their limits. Set a review routine so the on-call team and the integration owners look at the dashboard after each configuration change. Check: the dashboard shows the test caller's usage from the previous step, and the panels match the limit values recorded in the configuration.
Run a controlled load test that exceeds a limit
Using a load testing tool and a dedicated test project, the QA or platform engineer sends traffic from one caller above its configured limit while watching the server and the dashboard. Confirm that Medplum returns HTTP 429 responses for the excess requests, that the response headers and body match what your clients expect, and that requests under the limit still succeed. Test one caller at a time first, then a mixed run that reflects the inventory from step one. Do not run this against production patient data. Check: the 429 behavior, the retry guidance seen by clients and the dashboard counts all match the expected values, and the results are recorded with the configuration version they tested.
Document 429 handling for callers
The integration owners add 429 handling to each client's runbook and code: honor the retry guidance the server returns, apply backoff with jitter, and avoid retry storms from parallel workers. The on-call runbook gets a short entry explaining what a sustained 429 pattern for a caller means and who to contact before raising a limit. Re-review the inventory whenever the Medplum version changes, because limit behavior and default values can change between releases. Check: each caller's owner confirms in writing that its client handles 429 as documented, and the runbook entry is linked from the monitoring alerts for the deployment.
Tuning limits for users, integrations and Bots
Clinical and admin users in the web app generate short, interactive bursts. A clinician opening a chart triggers a cluster of reads for the patient, encounters, observations and medication requests within a few seconds, then pauses while reading or typing. Administrators running searches across user lists or bulk-editing practitioner roles can generate sustained activity within a single session. When limits are too low for this pattern, pages load partially, spinners stall, and users see errors during shift change, when many people sign in within the same few minutes.
- Login and page-load bursts: Size the per-user allowance for a full chart load plus several navigations in a row, and test that sequence directly.
- Shift-start peaks: Check whether many sign-ins land in the same window and whether they draw from a shared project-level quota.
- Admin bulk work: Keep administrative scripts and exports on their own identity so they do not exhaust the quota that clinicians depend on.
- Shared logins and kiosks: A shared account concentrates traffic on one quota, so give it a dedicated allowance or retire it.
Before changing anything, ask your clinical lead which screens are heaviest, then rehearse those workflows in staging with the rate limits dashboard open to see which quota runs closest to its ceiling.
Integrations and Medplum Agent feeds usually produce steady, scheduled or continuous flow. An interface engine may push HL7-derived resources all day, or a nightly job may sync a large set of records, and both can run alongside clinical traffic on the same project. These clients often retry automatically. If a 429 response triggers aggressive retries without backoff, a short quota shortage can grow into a backlog that delays clinical data for hours. The symptoms are queues that never drain, late results in the chart, and duplicate resources created by retries.
- Steady versus peak volume: Measure messages per hour at the busiest time of day, not the daily total, and set the allowance to that peak plus headroom.
- Client identity: Give each integration its own client credentials so its quota can be tuned without affecting users or other feeds.
- Bundle and batch sizes: Large bundles consume more weight per request, so agree bundle sizes with the vendor before setting limits.
- Search-heavy lookups: Matching or lookup queries cost more than direct reads, so confirm how often the feed searches.
Before raising or lowering a quota, confirm with the integration vendor how many messages they send per hour at peak, how they back off on 429 responses, whether they use conditional create or update to prevent duplicates, and what timeout their side enforces.
Bots and Subscriptions are event-driven. A single batch import or a workflow change can cause many resource writes in a short period, and each write may fire a Subscription that calls a Bot, which then reads and writes more resources. Bot code often runs unattended, so nobody notices a failing loop until the quota is exhausted for the whole project. A Bot that writes a resource matching its own Subscription can create a feedback loop that consumes the quota faster than anyone can respond.
- Dedicated Bot identity: Run each Bot under its own client identity so its quota is isolated and visible on the dashboard.
- Event fan-out: Count how many Subscriptions match a typical write, since one change can trigger several Bot calls.
- Retry behavior: Confirm that Bot code handles 429 responses with backoff and does not retry instantly.
- Loop guards: Make sure no Bot writes the data that triggers its own Subscription without a condition that stops the cycle.
Before changing a Bot quota, confirm the expected event rate with the team that owns the Bot, whether a bulk job is planned, how the Bot stores work that fails mid-run, and which alerts will fire when its quota runs low.
Handling 429 responses without breaking integrations
A client that receives an HTTP 429 response should slow down and retry later, so it stops sending the same request in a loop. Start by reading the retry signal the server returns. Medplum may include the standard Retry-After header on a throttled response, but the exact headers and body fields depend on your Medplum version. Confirm them in your own environment by sending controlled traffic above the limit of a test project and recording every header and field. Then back off exponentially with random jitter so retries from many workers spread out instead of arriving together. Parallel workers are the usual cause of retry storms, so share one request budget across them with a concurrency cap or token bucket per caller. Log every throttling event with the caller identity (client ID or Bot identifier), project, endpoint and the time the retry was scheduled.
On the operator side, start with the rate limits dashboard to see which caller consumed the budget during the window when 429 responses appeared. Confirm where the dashboard lives in your version and whether it breaks usage down by client, user or project. Then match the same time window against the server logs, looking for request IDs or client identifiers, to identify the endpoint and the calling integration. Check whether the caller is a scheduled job, a Bot or an integration that changed recently, since a new deployment or a bulk backfill often explains a sudden spike. Confirm which log fields record the caller identity in your deployment before you build alerts on them. The Medplum self-hosting docs are the place to start for your version's logging setup.
Decide whether the fix belongs in the integration or in the quota. If the caller issues many small searches, the usual fix is in the code: batch writes into batch or transaction Bundles, page results with _count and follow the paging links to fetch the rest, use _include or _revinclude to retrieve related resources in one call, and cache reference data such as value sets that change rarely. Raise a quota only after you have confirmed the traffic is legitimate and the integration is already efficient, and record who approved the change and why. A higher quota on a chatty integration only moves the bottleneck to the database and the next peak, so pair any change with a load check before it reaches production.
Limits to confirm in your environment
The research supplied for this page does not include Medplum's rate limit values, weighting tables or override syntax, so none of them appear here. The cards below list what to confirm for your own Medplum version and deployment, with the official docs or Medplum as the source of truth before any limit goes into production.
Exact configuration keys and defaults
Confirm the names, default values and units of every rate limit and quota setting for the Medplum version you run. Keys and defaults can differ between minor versions, so copy them from the documentation for your exact release rather than from examples or older notes. Record the values you rely on in your configuration repository so a reviewer can trace each limit to a version.
Self-hosting docsPer-instance or shared enforcement
Find out whether request counters live in each app server's memory or in a shared store. If counters are per instance, a client that spreads requests across three app servers can exceed the intended ceiling by up to the number of instances. Test this with your load balancer and replica count before you set limits that depend on it.
Counter behavior during Redis failover
Redis is the cache in the Medplum stack, so ask whether rate limit counters depend on it and what happens to them during a failover. Confirm whether counters reset, persist or fail open while a replica is promoted. Your answer determines whether a failover can briefly lift every limit at once, which matters for shared integrations and Bots.
Agent and Bot parity
Confirm whether limits apply the same way to requests from the Medplum Agent, from Bots and from ordinary user or client credential sessions. Integrations that run through an Agent or Bot may be counted under a different identity, and a limit that protects users may not protect your integrations. Test each path separately with a representative workload.
Weighting changes between minor versions
Ask whether the weight assigned to each FHIR interaction, such as search, create or batch, changes in a minor release. Medplum ships minor versions two to three times a year, so a weight change can shift your quota headroom without any configuration change on your side. Read the release notes for each minor version you adopt and retest your quota after each one.
Versioning policyOverrides across upgrades
Check how project and user overrides behave when you move through each minor version in sequence. Confirm whether overrides are preserved, migrated or silently reset, and whether any override key is renamed. Because skipping minor versions causes startup failures, plan a test upgrade in a non-production environment and compare effective limits before and after.
Upgrade guideQuestions teams ask before setting Medplum rate limits
What does setting up Medplum rate limits cost in effort, and who does the work?
The effort depends on how many projects, integrations and Bots your deployment runs, and on how well your traffic is already understood. Your team pays for the time its engineers spend on traffic review, approvals and testing, while a partner's fees cover the configuration, load testing and documentation you agree in a written scope. Costs recur when limits need retuning after traffic changes or upgrades. No fixed figure applies to every deployment, so ask any partner for a quote that lists each deliverable and who signs off on the limits. DeployOpen does not publish prices and issues a quote from the written scope.
How long does a first rate limit configuration and load test take?
The duration is driven by how quickly you can produce representative traffic and agree on the numbers, not by the configuration itself. Key drivers include the size of your integration inventory, whether Bots and external systems share one project or several, how many test cycles you need, and how long change approval takes in your organization. Ask for a timeline in the written scope that separates discovery, configuration, testing and rollout, and confirm which steps depend on your staff's availability. Medplum's own docs should be checked for the current configuration keys before you plan the schedule.
Can our internal team set Medplum rate limits without a partner?
Yes, a team with Medplum administration experience can configure server defaults and project overrides using its own staff. The harder parts are usually building realistic load profiles, reading the rate limits dashboard against database and cache metrics, and deciding which integration gets a higher weight. A partner is most useful when you lack a test environment, need an independent review of the limits, or must document the decisions for an audit. Decide early which tasks stay in-house so the team can plan on-call coverage during the first rollout.
What inputs does the rate limit work need from our side?
You will need to provide access to traffic logs, an inventory of every integration, Bot and client that calls your FHIR API, and a non-production environment that matches production settings closely enough to test limits. Change approval is also required because rate limits affect clinical systems that may depend on bursts of traffic. Useful inputs include the projects and users that send the most requests, known batch jobs, and the times of day when imports or exports run. Confirm with your security team who may view logs that contain identifiers.
Do Medplum rate limits need retuning after every upgrade?
Not every upgrade changes limits, but you should review them after each one because new versions can change request handling, and your traffic will also have shifted. Medplum ships patch versions weekly and minor versions two to three times a year, and self-hosted deployments must move through each minor version in sequence. Include a limits check in your upgrade test plan, compare dashboard results before and after, and record any changed settings in your change log. Read the release notes for the target version before scheduling the rollout.
How do rate limits relate to high availability and capacity planning?
Rate limits protect shared capacity, so they work alongside your server sizing, connection pool limits and redundancy rather than replacing them. A limit set too high lets one integration exhaust PostgreSQL connections or Redis capacity, which high availability designs do not prevent. A limit set too low returns 429 responses to valid clients during peaks. Plan limits from the same load tests you use for sizing, and revisit them after failover tests, because a failover can shift traffic onto fewer application servers for a period.
What should we confirm about Medplum's limit features before we start?
Confirm the rate limit settings, dashboard views and weighting options in the documentation for the exact version you run, since features differ across releases. Ask whether Bots and Subscriptions can have separate quotas in your version, and how 429 responses appear in client logs. Verify these details with Medplum's self-hosting documentation and your own test environment, not from memory of a previous release. Put the confirmed configuration in the written scope so the partner and your team test the same behavior.
Who is responsible for limits when a clinical integration starts getting 429 responses?
Responsibility should be assigned in writing before go-live, usually to the platform team for server settings and to the integration owner for client retry behavior. Your clients should back off and retry when they receive 429 responses instead of resubmitting immediately, which otherwise deepens the overload. Agree on an escalation path, a named approver for limit increases, and a rollback step. Clinical stakeholders should know which workflows are affected during a throttling event, since rate limits can delay messages or data that staff rely on.
How DeployOpen scopes and supports Medplum rate limit work
DeployOpen plans, configures, tests and documents request rate limits and FHIR interaction quotas on a self-hosted Medplum deployment inside your own infrastructure. The work starts from your traffic patterns and integration inventory, and the resulting limits, dashboards and runbooks stay with your team.
How we scope
- The written scope lists which Medplum projects, user types, Bots and integrations need rate limit or quota settings.
- Scope includes a review of current server defaults and the traffic each client and integration is expected to generate.
- Engagements are fixed-scope, with deliverables and timelines agreed in writing before work begins.
How we build
- Server defaults, project and user overrides, and weighted FHIR quotas are configured in your environment and version-controlled.
- Quotas for Bots and integrations are set so that one heavy client cannot starve interactive clinical users.
- Test runs confirm that 429 responses, retry behavior and the rate limits dashboard show the intended results.
How we hand over
- Deliverables include a configuration record, a rule-by-rule explanation of each limit and its owner.
- Runbooks cover how to read the rate limits dashboard, adjust overrides and respond to 429 responses from integrations.
- Your team receives a walkthrough so operators can change limits without reopening the design decisions.
How we support
- Ongoing support, upgrades and continuous testing are available as retainers after handover.
- Limits are rechecked when Medplum releases change request handling or when new integrations are onboarded.
- Ask any quote to name who maintains the limit configuration after a Medplum upgrade and how changes are reviewed.

