Skip to content

Commit

Permalink
update content for best practices and 429 guidance
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-dzeda committed Apr 9, 2024
1 parent 5e6922f commit 04a3b2b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 18 deletions.
7 changes: 1 addition & 6 deletions _includes/build/best_practices.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,2 @@
<div>
<p>
There are many ways to accomplish the same objective within BCDA, and following our list of best practices can ensure optimal performance for all consumers of BCDA.
</p>

</div>

</div>
15 changes: 4 additions & 11 deletions _includes/build/best_practices_429.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@

<div>
<p>Occasionally, when interacting with BCDA, you might encounter responses with a status code of <code>429 Too Many Requests</code>.</p>

<p>BCDA assigns 429 response codes based on two independent criteria:</p>

<p>A status code of <code>429</code> indicates “Too Many Requests.” This can occur due to two reasons:</p>
<ol>
<li>Making too many HTTP requests in a period of time.</li>
<li>Attempting to create duplicate jobs.</li>
<li>Making too many HTTP requests within a period of time</li>
<li>Trying to recreate jobs already marked as "In-Progress.” For reference, you can view both existing and past jobs using the /jobs endpoint. See <a href=build.html#jobs-history>Request Jobs History</a> for more details.</li>
</ol>

<p>Regardless of the reason, BCDA will include a <strong>Retry-After</strong> header in its response. It's considered best practice to wait until the period specified in this header has elapsed before making further requests. This ensures your client can adapt without manual intervention, even if the rate-limiting parameters change.</p>

<p>Concerning duplicate jobs, BCDA defines them as attempts to recreate a job already marked as "In-Progress". For reference, you can view both existing and past jobs by accessing the job history endpoint at <code>/jobs</code>.</p>
<p>Regardless of the reason, you will see a <strong>Retry-After</strong> response in the header. Wait until the period of time specified in the header has passed before making any more requests. This makes sure your client can adapt without manual intervention, even if the rate-limiting parameters change.</p>
</div>
2 changes: 1 addition & 1 deletion build.html
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ <h2>

<div id="bulk-best-practices" class="guide-content">
<h1>
Best Practices for Utilizing BCDA
Best Practices
</h1>
<div class="ds-u-font-size--base ">
{% include build/best_practices.html %}
Expand Down

0 comments on commit 04a3b2b

Please sign in to comment.