Environment Strategy
Use separate names, destinations, and rollback actions for each environment.
2 min read
Use this guide to keep staging and production traffic separate.
Purpose#
Use this guide to:
- Separate the destinations for each environment.
- Move reviewed changes to production.
- Define the rollback actions before the production change.
Before you start#
- Access to endpoint and relay-target management.
- Destination URLs and inboxes for each environment.
Procedure#
1. Create environment-specific relay targets#
Examples:
billing-webhook-stgbilling-webhook-prod
Include the environment in the target name and the target description.
2. Create environment-specific endpoints#
Examples:
orders-intake-stgorders-intake-prod
Keep the method, payload, and security configuration aligned. Let them differ only if the difference is intentional.
3. Use staging first#
- Attach only the staging destinations.
- Send representative traffic.
- Read the outcomes in Activity.
- Make sure that the destination operates as expected.
4. Promote to production#
- Apply the reviewed configuration to the production endpoint.
- Make sure that the production secrets and certificates are correct.
- Send a controlled production request.
- Monitor Activity during the change.
5. Document ownership and rollback#
For each production endpoint, record these items:
- The team that owns the endpoint
- The owner of the destination
- The rollback action. If the senders can retry, pause the endpoint temporarily. Record the retry window of the sender and the
Retry-Afterhandling. - Each intentional change that disables an endpoint, removes or disables a destination, or rotates the URL. Record the traffic that PayloadRelay drops. A disabled URL and an old URL return
404. An endpoint with no enabled destination that matches can accept an event and not deliver it.
Expected result#
- Staging and production stay isolated.
- Promotion uses the same steps each time.
- You can do the rollback quickly.
Common issues and fixes#
- Traffic sent to the wrong destination: use naming rules, and review the destinations before you save.
- Production-only problems: examine the production authentication, certificates, and headers again.
- Confusing endpoint lists: use a consistent prefix or suffix.