<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Metheny80</title>
    <description>The latest articles on DEV Community by Metheny80 (@metheny).</description>
    <link>https://dev.to/metheny</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F916353%2F96eac9e2-0072-4436-82bb-1bf9b1d651ef.png</url>
      <title>DEV Community: Metheny80</title>
      <link>https://dev.to/metheny</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/metheny"/>
    <language>en</language>
    <item>
      <title>Scaling HTTP request with responses</title>
      <dc:creator>Metheny80</dc:creator>
      <pubDate>Sat, 27 Aug 2022 11:47:13 +0000</pubDate>
      <link>https://dev.to/metheny/scaling-http-request-with-responses-33lb</link>
      <guid>https://dev.to/metheny/scaling-http-request-with-responses-33lb</guid>
      <description>&lt;p&gt;I'm trying to understand how to be able to scale requests which need.&lt;br&gt;
We have a REST API backend hosted in AWS ECS instances, and of course we can scale-up horizontally when needed.&lt;br&gt;
The question is how to deal with peaks, or an increase in requests while the scale-up is in progress without losing any requests.&lt;br&gt;
I found many posts about using queues, but mainly for jobs that are fire &amp;amp; forget.&lt;br&gt;
I assume handling scale for HTTP requests where a response to the client is required is a very common issue.&lt;br&gt;
Examples include a user trying to get or update info about himself (&lt;code&gt;GET /user&lt;/code&gt; or &lt;code&gt;POST /user&lt;/code&gt;). These requests need to return information or sometimes an error code (e.g. data is invalid / DB data conflict occurred).&lt;br&gt;
Of course we can use caching to reduce the processing time for a request, but still that doesn't eliminate the ability to handle a sudden increase in requests.&lt;br&gt;
Using queues for this case means that the backend should queue the request and then after the request is handled, needs to wait for it to be processed and return a result / error code to the blocking client.&lt;br&gt;
Meaning handling these types of requests asynchonously.&lt;br&gt;
While technically it may be possible, this complicates the implementation, and I'm wondering if I'm missing anything simpler.&lt;/p&gt;

&lt;p&gt;What is the best practice for this?&lt;/p&gt;

</description>
      <category>backend</category>
      <category>scalability</category>
    </item>
  </channel>
</rss>
