How it works
Replicate is a cloud service which stores requests, so that the VS Code extension can later replay them locally.
You can either store all requests, sample them (e.g. 1 in 100), or store them based on a condition (e.g. errors, based on a header, etc).
Security
Because we're storing potentially sensitive data, data is encrypted using a key which only you hold. This means that we never see your data.
Being Efficient
Storing requests has two types of cost:
Latency
To ensure we do not slow down user-requests, we run our API calls in parallel to your request handler. This adds little/no latency.
Storage
We charge based on the number of requests stored, and the amount of data stored.
You can control this by:
-
Choose your routes: think about which endpoints you want to store. E.g. if a route is high volume and uninteresting, don't enable it for replicate.
-
Retention: consider how long you need to store requests. This is a tradeoff between cost and usefulness. E.g. if you're storing requests for debugging, you might only need to store them for a few days.
-
Library: find interesting requests and save them to your shared library. These requests are never auto-deleted. This helps you easily organize & find the most useful requests, add comments, etc. But it can also indirectly improve efficiency as you're choosing what to store long-term (so you can use a lower auto-rention period).
Because of this, consider sampling requests.
Getting ALL the state.
A request isn't always enough to fully reproduce a run. So we have helpers/recommendations for common scenarios. See the next section for specific guides on things like auth, production vs. dev database, etc.