11. Prepare for Production
The example works. Before it takes real traffic, settle the points below. Each is a decision more than a task: the right answer depends on your context.
Source and versioning
Production must be reproducible: you should be able to say exactly what runs and to rebuild it.
| Question | Recommendation |
|---|---|
| Where is the route? | In a repository, not inline (step 7) |
| What is deployed in production? | A release, never a branch |
| Is the same thing tested and released? | Yes when the same release is deployed to each environment in turn |
Configuration and secrets
- Nothing sensitive in the route or in a variable written in clear: use Secure Properties, or a variable that reads a stored configuration.
- One configuration per environment where values differ (addresses, credentials, limits) and the same names in each.
- Certificates and keys are stored configurations too: they are replaced without touching the integration.
Replicas, resources and disruption budget
Development defaults are sized for one person testing. Production needs room for load and for the loss of an instance.
| Setting | Development | Production |
|---|---|---|
| Replicas | 1 | 2 or more |
| Memory Limit | The default | Measured under load, with margin |
| Disruption Budget | — | Keep at least one instance up during maintenance |
| Health Probes | The defaults | Adjusted when the integration is slow to start |
On the gateway, Autoscaling adds instances when traffic rises; keep at least two.
Gateway and API policies
A public API needs more than a route: decide who may call it and what happens under load.
| Question | Recommendation |
|---|---|
| Is it served over HTTPS only? | Publish on an HTTPS access point; do not keep an HTTP one for the same API |
| Who can call it? | Tokens, with the audience check on (step 9) |
| What if a client goes wild? | A rate limit |
| What if the integration is slow? | A timeout, shorter than the caller's own |
| What if it fails briefly? | A retry, only for calls that can safely be repeated |
A retry sends the same request again. That is safe for a read, and can create a duplicate for a write unless the integration recognises a request it has already handled.
Environment services
- The Camel Integration Service of the production environment points at a registry and Maven settings of its own.
- Its Log Exporter uses persistent buffer storage, so that no log is lost when it restarts, and sends logs to where your teams read them.
- Its network rules say what the environment may call. Systems in your datacenter are reached through a private link.
RBAC Roles
Calling the API and managing it are separate.
| Role | Typical permissions |
|---|---|
| Developer | Create and manage integrations, in development only |
| Release manager | Apply changes on integrations and APIs, in production |
| Security | Manage policies, auth gateways and lists of clients |
Permissions can be restricted to some environments. See RBAC principles.
Dashboards, alerts and logs
- A dashboard for the API: requests, errors, response time.
- An alert when errors or response time rise.
- Traces kept long enough to investigate an incident.
See Monitoring.
Deploy a new release to a non-production environment, then roll back, at least once. Until a rollback has been tried, nothing shows that it works.
Production Checklist
- The integration is built from a release.
- No secret in the source or in clear variables.
- Two instances or more, and a disruption budget.
- Memory limit measured under load.
- HTTPS only, with a certificate that is renewed before it expires.
- Tokens, audience check on, one client per calling application.
- Rate limit and timeout on the API.
- Logs exported, alerts in place.
- Production permissions restricted to those who need them.
Related pages
| You want to | Read |
|---|---|
| Every setting of an integration | Integrations |
| Every policy rule | Policies |
| Every kind of stored configuration | Templates |
| Reach a system in a private network | Private Links |
| Understand permissions | RBAC principles |