> For the complete documentation index, see [llms.txt](https://developer.esw.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.esw.com/getting-started/get-started-with-esw/best-practices.md).

# Best Practices

This section describes the best practices and ESW recommendations that you can follow to ensure the smooth flow of data between your servers and ESW servers.

### Transport security

* Expose your receiving endpoint over HTTPS.
* Use a valid, publicly trusted certificate.
* Ensure your server presents the full certificate chain.

{% hint style="info" %}
ESW verifies SSL certificates when delivering payloads.
{% endhint %}

### Delivery semantics (distributed systems reality)

* Expect retries on network or endpoint failures.
* Do not assume strict ordering of events.
* Expect duplicate deliveries in some failure modes.
* Make your handlers **idempotent**.
* Treat each delivery as independent and safe to process more than once.

{% hint style="warning" %}
ESW uses a queuing model and delivers events on a best-effort basis. Ordering is not guaranteed.
{% endhint %}

### Support and troubleshooting

When you contact ESW about delivery or integration issues, include:

* Your environment (Sandbox or Production).
* Your endpoint URL and the approximate time window.
* The HTTP status codes you returned.
* The response body you returned (if any).
* Any request identifiers or correlation IDs (if provided).

### Rate limiting and traffic spikes

Rate limits can turn a short spike into a long replay backlog. Plan for bursts.

* Align provider-level throttles with your expected peak traffic.
* Avoid blanket throttles that convert bursts into sustained failures (for example `429` / `5xx`).
* Ensure your endpoint can absorb replay traffic after an outage.
* Use internal buffering (queue/worker pattern) so you can accept deliveries quickly.

<details>

<summary>Example failure loop (what to avoid)</summary>

You launch a new product. Traffic spikes. Your provider starts throttling requests.

ESW continues generating events. Deliveries fail (`429`/`5xx`). ESW queues and retries later.

Retries add more traffic. Throttling continues. The queue grows for hours.

</details>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://developer.esw.com/getting-started/get-started-with-esw/best-practices.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
