diff --git a/content/event-platform/benchmark.md b/content/event-platform/benchmark.md new file mode 100644 index 000000000..2ace8e67b --- /dev/null +++ b/content/event-platform/benchmark.md @@ -0,0 +1,51 @@ +## Benchmark Your subscription + +## Why should you benchmark your subscription? + +The purpose of benchmarking is to test whether your destination endpoint can handle the event load from the PIM. +This allows you to evaluate the performance and reliability of your infrastructure through a controlled stress test, ensuring it is prepared for production use. +To facilitate this, we offer a dedicated endpoint that initiates a benchmark test, simulating a customizable event load from the PIM. + +## How to benchmark your subscription? + +### Configure a subscription for benchmark + +To begin, follow our standard getting started guide available [here](/event-platform/getting-started.html). +The only difference in the setup process is during the subscription creation step, detailed [here](/event-platform/getting-started.html#4-create-a-subscription). +You must set the `source` property of your subscription to `benchmark` instead of `pim`. + +### Trigger the benchmark + +Send a `POST` request to the following endpoint: `https://event.prd.sdk.akeneo.cloud/api/v1/benchmark`. + +Here is an example of benchmark call: + +```bash [snippet:Shell] + curl --request POST 'https://event.prd.sdk.akeneo.cloud/api/v1/benchmark' \ +--header "X-PIM-URL: $TARGET_PIM_URL" \ +--header "X-PIM-TOKEN: $PIM_API_TOKEN" \ +--header "X-PIM-CLIENT-ID: $CLIENT_ID" \ +--header 'Content-Type: application/json' \ +--data-raw '{ + "type": "com.akeneo.benchmark.v1.test", + "count": 1000, + "size": "10" +}' +``` + +#### Body properties + +- `type:` The type of benchmark event to launch. Currently, `com.akeneo.benchmark.v1.test` is the only available option. +- `count (optional):` A limit on the number of events to be sent. For example, `50` (default `1000`). +- `size (optional):` The size of the event payload in kb. Max is 10 kb. +- `custom_data (optional):` A field to include custom data in the event payload. This can be used to add additional information relevant to your benchmark test. + +::: info +You can find the full request in our [Postman collection](/event-platform/getting-started.html#4-create-a-subscription). +::: + +## Analyzing the results + +After the benchmark test is complete, you should carefully analyze the results on your end. +Look for any processing errors, timeouts, or missing events in your system. +If you encounter issues, it may indicate that your infrastructure is not sufficiently scaled to handle the full production load from the PIM and may require adjustments. diff --git a/content/event-platform/getting-started.md b/content/event-platform/getting-started.md index f439cfe2f..dcd6bf094 100644 --- a/content/event-platform/getting-started.md +++ b/content/event-platform/getting-started.md @@ -51,7 +51,12 @@ With your subscription in place, you're ready to trigger the event you subscribe After deleting the product, verify that the event was successfully triggered by checking the payload received at your destination URL. ---- +### 6. Consider benchmarking your Subscription + +To ensure your endpoint can handle the event load from the PIM, we highly recommend performance testing your subscription. +This will help you assess its performance and reliability under stress. + +To learn more, see our guide: [Benchmark your subscription](/event-platform/benchmark.html) ## Using Curl @@ -203,5 +208,13 @@ Alternatively, you can also update a product using the [Akeneo PIM REST API](/ap After updating the product, verify that the event was successfully triggered by checking the payload received at your destination URL. +### 5. Consider benchmarking your Subscription + +To ensure your endpoint can handle the event load from the PIM, we highly recommend performance testing your subscription. +This will help you assess its performance and reliability under stress. + +To learn more, see our guide: [Benchmark your subscription](/event-platform/benchmark.html) + ::: panel-link Explore Key Concepts to deepen your understanding of the [Event Platform](/event-platform/concepts.html) ::: + diff --git a/content/event-platform/logs.md b/content/event-platform/logs.md index 454e31e79..5a3bad014 100644 --- a/content/event-platform/logs.md +++ b/content/event-platform/logs.md @@ -115,3 +115,6 @@ When deduplication occurs: If three errors with the same `subscription_id` and `error_message` are generated between 10:00 AM and 10:05 AM, only one log entry will be visible in the system, and its `timestamp` will show the time of the last occurrence (e.g., `10:04:59 AM`). This mechanism ensures efficient error tracking without overwhelming the system with repetitive entries, while still preserving the traceability of recurring issues. + +::: panel-link Consult now our benchmark section [Next](/event-platform/benchmark.html) +::: diff --git a/tasks/build-doc.js b/tasks/build-doc.js index 3fe651dd3..1eafe1a7e 100644 --- a/tasks/build-doc.js +++ b/tasks/build-doc.js @@ -728,6 +728,7 @@ gulp.task('build-event-platform', ['clean-dist','less'], function () { 'limitations.md': "Quota & Limits", // 'migrate-from-deprecated-event-api.md': "Migrate from deprecated event API", 'logs.md': "Logs", + 'benchmark.md': "Benchmark your subscription", 'faq.md': "FAQ", };