> 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

### 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
