{"id":2068,"date":"2020-11-05T06:18:45","date_gmt":"2020-11-05T06:18:45","guid":{"rendered":"https:\/\/ubiq.co\/tech-blog\/?p=2068"},"modified":"2025-08-25T04:58:30","modified_gmt":"2025-08-25T04:58:30","slug":"how-to-limit-download-speed-in-nginx","status":"publish","type":"post","link":"https:\/\/ubiq.co\/tech-blog\/how-to-limit-download-speed-in-nginx\/","title":{"rendered":"How to Limit Download Speed in NGINX"},"content":{"rendered":"\n<p>NGINX is a popular web server used by many high traffic websites and applications. It provides numerous features to easily handle a large number of concurrent users. Nevertheless, it is important to limit HTTP bandwidth on your website to prevent a few users from cornering all your downloads and ensure that all users have good user experience. It also protects your site from malicious attacks such as Brute force and DDOS attacks. In this article, we will look at how to limit download speed in NGINX, which in turn limits HTTP bandwidth. As a result, each user will be able to download content at a maximum download speed that we define.<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-limit-download-speed-in-nginx\/#What_is_Rate_Limiting_in_NGINX\" >What is Rate Limiting in NGINX<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-limit-download-speed-in-nginx\/#How_to_Limit_Download_Speed_in_NGINX\" >How to Limit Download Speed in NGINX<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-limit-download-speed-in-nginx\/#1_Limit_Number_of_Connections\" >1. Limit Number of Connections<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-limit-download-speed-in-nginx\/#2_Limit_HTTP_bandwidth\" >2. Limit HTTP bandwidth<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-limit-download-speed-in-nginx\/#3_Limit_Request_Rate\" >3. Limit Request Rate<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-limit-download-speed-in-nginx\/#Conclusion\" >Conclusion<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"What_is_Rate_Limiting_in_NGINX\"><\/span>What is Rate Limiting in NGINX<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>NGINX allows various method to limit the number of HTTP requests users are allowed to make. In all cases, it uses a leaky bucket algorithm, also known as FIFO (First In First Out) queue. Here NGINX enqueues all requests it receives and processes them sequentially to avoid getting overwhelmed. There are several ways you can control how the queue is filled. For example, NGINX allows you to limit no. of connections, request rate, and network bandwidth. For each of these controls, it provides a distinct server directive that directly controls these parameters, and thereby the rate of processing.<br><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"How_to_Limit_Download_Speed_in_NGINX\"><\/span>How to Limit Download Speed in NGINX<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Here is how to limit download speed in NGINX. We will use <em>limit_rate<\/em> directive to limit download speed in NGINX. We have assumed that you have already installed NGINX on your server. Here are the steps to install NGINX.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"1_Limit_Number_of_Connections\"><\/span>1. Limit Number of Connections<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>The simplest way to limit download speed or rate of processing is to control the number of concurrent connections allowed at any given point of time.<\/p>\n\n\n\n<p>You can use limit_conn directive to easily limit the number of connections to a given server resource, within location, server or http context.<\/p>\n\n\n\n<p>Here is an example to use limit_conn to limit number of connections to 10 for a given URL.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">http {<br><br>    # ...<br><br>    limit_conn my_url 10;<br><br>    # ...<br><br>}<\/pre>\n\n\n\n<p>Thereafter, when you define the location for above URL, NGINX will automatically limit number of connections.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">location \/my_url\/ {<br>     proxy_pass http:\/\/your_backend;<br>}<\/pre>\n\n\n\n<p>In this case, the requests to \/my_url will be proxied to your_backend and it will be limited to 10. This approach can be used to limit number of connections to any resource on your server, not just URL. For example, it is very effective to limit number of connections to images and documents.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"2_Limit_HTTP_bandwidth\"><\/span>2. Limit HTTP bandwidth<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p><em>limit_rate<\/em> directive allows you to limit download speed in NGINX. You can add it in <em>http<\/em>, <em>location<\/em> or <em>server<\/em> blocks<\/p>\n\n\n\n<p>Here&#8217;s an  example to limit download speed to 50kb\/sec.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">limit_rate 50k;<\/pre>\n\n\n\n<p>Here&#8217;s how you to add it to http block and apply the limit to all servers.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">http {\n   ...\n   limit 50k;\n   ...\n}<\/pre>\n\n\n\n<p><\/p>\n\n\n\n<p>Here&#8217;s how to limit http bandwidth for a specific server and all its URLs<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">server {\n   server_name www.example.com;\n   listen 80;\n   ...\n   limit_rate 50k;\n   ...\n}<\/pre>\n\n\n\n<p>Here&#8217;s how to limit download speed for specific location, e.g \/downloads\/<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">location \/downloads\/ {\n   ...\n   limit rate 50k;\n   ...\n}<\/pre>\n\n\n\n<p>The above configuration tells NGINX to limit download speed per connection. <\/p>\n\n\n\n<p>Bonus Read : <a href=\"https:\/\/ubiq.co\/tech-blog\/how-to-enable-nginx-gzip-compression\/\">How to Enable NGINX Gzip Compression<\/a><\/p>\n\n\n\n<p>However, if users create multiple connections, they can get more bandwidth. So we will use <a href=\"http:\/\/nginx.org\/en\/docs\/stream\/ngx_stream_limit_conn_module.html\" target=\"_blank\" rel=\"noreferrer noopener\">limit_conn_zone<\/a> directive in <em>http<\/em> block to limit total amount of shared memory available for managing connections.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">https{<br>   ...<br>   limit_conn_zone $binary_remote_addr zone=addr:10m;<br>   ...<br>}<\/pre>\n\n\n\n<p>Once the allotted memory is exhausted for a connection, NGINX will close the connection.<\/p>\n\n\n\n<p>Similarly, we also add the following line in <em>location<\/em> block to limit 1 connection per IP address.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">limit_conn addr 1;<\/pre>\n\n\n\n<p>Bonus Read : <a href=\"https:\/\/ubiq.co\/tech-blog\/how-to-enable-leverage-browser-caching-in-nginx\/\">How to Enable Leverage Browser Caching in NGINX<\/a><\/p>\n\n\n\n<p>Based on our above learnings, here&#8217;s a sample configuration that you can use to limit download speed in NGINX.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">http {\n   limit_conn_zone $binary_remote_addr zone=addr:10m;\n   ...\n\n   server {\n      ...\n      location \/downloads\/ {\n         ...\n         limit rate 50k;\n         ...\n      }\n      ...\n   }\n...\n}<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"3_Limit_Request_Rate\"><\/span>3. Limit Request Rate<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>In this case, we can limit the number of requests processed by NGINX using limit_req_zone and limit_req directives. limit_req_zone allows you to specify the max amount of shared memory to be utilized for a given memory zone. It needs to be specified in http context. Here is its syntax.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">http {<br>    ...<br>    limit_req_zone key zone rate;<br>    ...<br>}<\/pre>\n\n\n\n<p>In the above command, the key is the server variable used to uniquely identify each client, zone is the name and space definition of memory zone, and rate is the rate of request. Here is an example to create a shared memory zone called abc with a space of 10Mb, where each client is differentiated using their IP address stored in $binary_remote_addr server variable. The rate of request is limited to 1 request per second per client.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">http {<br>    #...<br>    limit_req_zone $binary_remote_addr zone=abc:10m rate=1r\/s;<br>}<\/pre>\n\n\n\n<p>Once you have defined the shared memory zone, you can use it with limit_req directive in location, server or http context. Here is an example to apply the zone  abc to my_url within location block.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">http {<br>    ...<br><br>    limit_req_zone $binary_remote_addr zone=abc:10m rate=1r\/s;<br><br>    server {<br>        ...<br><br>        location \/my_url\/ {<br>            limit_req zone=abc;<br>        }<br>    }<br>}<\/pre>\n\n\n\n<p>In the above case, when the number of requests exceeds the size of shared memory, NGINX will respond with 503 Service Unavailable. In this case, you can buffer and process these excessive requests by specifying the burst parameter that specifies the max number of extra requests that are put in an additional queue.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">http {<br>    ...<br><br>    limit_req_zone $binary_remote_addr zone=abc:10m rate=1r\/s;<br><br>    server {<br>        ...<br><br>        location \/my_url\/ {<br>            limit_req zone=abc burst=10;<br>        }<br>    }<br>}<\/pre>\n\n\n\n<p>In the above case, if the request rate is more than 1 request\/sec, it is put in shared memory zone abc. If it is even more than that, then it is put into a buffer with length 10. If there are even more requests, then only they will be rejected with 503 error response.<\/p>\n\n\n\n<p>In this case, the overall rate of processing request will still be limited to 1 request\/second and the extra requests will need to wait. If you do not want them to face any delay, use nodelay keyword as shown below.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">location \/my_url\/ {<br>            limit_req zone=abc burst=10 <strong>nodelay<\/strong>;<br>        }<\/pre>\n\n\n\n<p>In this case, all the extra requests will be processes immediately even if the rate of processing requests is more than 1 request\/second as specified by us in limit_req_zone directive.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span>Conclusion<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>In this article, we have learnt how to limit download speed in NGINX. You can do so by controlling the number of incoming connections, requests or request rate. Depending on your requirements, you can use any of the above methods to quickly limit the requests processed by your NGINX server and regulate server load.<\/p>\n\n\n\n<p><a href=\"https:\/\/ubiq.co\/\">Ubiq<\/a>&nbsp;makes it easy to visualize data, and monitor them in real-time dashboards.&nbsp;<a href=\"https:\/\/ubiq.co\/accounts\/register\">Try Ubiq<\/a>&nbsp;for free.<\/p>\n\n\n\n<p>Also read:<br><a href=\"https:\/\/ubiq.co\/tech-blog\/how-to-enable-nginx-gzip-compression\/\">How to Enable GZIP Compression in NGINX<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Did you know you can limit HTTP bandwidth using NGINX? Here&#8217;s how to limit download speed in NGINX.<\/p>\n","protected":false},"author":1,"featured_media":2077,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[9],"tags":[216],"class_list":["post-2068","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-nginx","tag-limit-download-speed"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Limit Download Speed in NGINX - Ubiq BI<\/title>\n<meta name=\"description\" content=\"Did you know you can limit HTTP bandwidth using NGINX? Here&#039;s how to limit download speed in NGINX per connection IP. Use it to control website data usage.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-limit-download-speed-in-nginx\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Limit Download Speed in NGINX - Ubiq BI\" \/>\n<meta property=\"og:description\" content=\"Did you know you can limit HTTP bandwidth using NGINX? Here&#039;s how to limit download speed in NGINX per connection IP. Use it to control website data usage.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ubiq.co\/tech-blog\/how-to-limit-download-speed-in-nginx\/\" \/>\n<meta property=\"og:site_name\" content=\"Ubiq BI\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/ubiqbi\" \/>\n<meta property=\"article:published_time\" content=\"2020-11-05T06:18:45+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-08-25T04:58:30+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/ubiq.co\/tech-blog\/wp-content\/uploads\/2020\/11\/How-to-Limit-Download-Speed-in-NginX.png\" \/>\n\t<meta property=\"og:image:width\" content=\"640\" \/>\n\t<meta property=\"og:image:height\" content=\"360\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Sreeram Sreenivasan\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@UbiqBI\" \/>\n<meta name=\"twitter:site\" content=\"@UbiqBI\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Sreeram Sreenivasan\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-limit-download-speed-in-nginx\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-limit-download-speed-in-nginx\\\/\"},\"author\":{\"name\":\"Sreeram Sreenivasan\",\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/#\\\/schema\\\/person\\\/db98d49a766a3a111d8510935ab90abc\"},\"headline\":\"How to Limit Download Speed in NGINX\",\"datePublished\":\"2020-11-05T06:18:45+00:00\",\"dateModified\":\"2025-08-25T04:58:30+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-limit-download-speed-in-nginx\\\/\"},\"wordCount\":1030,\"image\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-limit-download-speed-in-nginx\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/i0.wp.com\\\/ubiq.co\\\/tech-blog\\\/wp-content\\\/uploads\\\/2020\\\/11\\\/How-to-Limit-Download-Speed-in-NginX.png?fit=640%2C360&ssl=1\",\"keywords\":[\"limit download speed\"],\"articleSection\":[\"Nginx\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-limit-download-speed-in-nginx\\\/\",\"url\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-limit-download-speed-in-nginx\\\/\",\"name\":\"How to Limit Download Speed in NGINX - Ubiq BI\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-limit-download-speed-in-nginx\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-limit-download-speed-in-nginx\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/i0.wp.com\\\/ubiq.co\\\/tech-blog\\\/wp-content\\\/uploads\\\/2020\\\/11\\\/How-to-Limit-Download-Speed-in-NginX.png?fit=640%2C360&ssl=1\",\"datePublished\":\"2020-11-05T06:18:45+00:00\",\"dateModified\":\"2025-08-25T04:58:30+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/#\\\/schema\\\/person\\\/db98d49a766a3a111d8510935ab90abc\"},\"description\":\"Did you know you can limit HTTP bandwidth using NGINX? Here's how to limit download speed in NGINX per connection IP. Use it to control website data usage.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-limit-download-speed-in-nginx\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-limit-download-speed-in-nginx\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-limit-download-speed-in-nginx\\\/#primaryimage\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/ubiq.co\\\/tech-blog\\\/wp-content\\\/uploads\\\/2020\\\/11\\\/How-to-Limit-Download-Speed-in-NginX.png?fit=640%2C360&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/ubiq.co\\\/tech-blog\\\/wp-content\\\/uploads\\\/2020\\\/11\\\/How-to-Limit-Download-Speed-in-NginX.png?fit=640%2C360&ssl=1\",\"width\":640,\"height\":360,\"caption\":\"limit download speed in nginx\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-limit-download-speed-in-nginx\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Limit Download Speed in NGINX\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/#website\",\"url\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/\",\"name\":\"Ubiq BI\",\"description\":\"Build dashboards &amp; reports in minutes\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/#\\\/schema\\\/person\\\/db98d49a766a3a111d8510935ab90abc\",\"name\":\"Sreeram Sreenivasan\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g\",\"caption\":\"Sreeram Sreenivasan\"},\"description\":\"Sreeram Sreenivasan is the Founder of Ubiq. He has helped many Fortune 500 companies in the areas of BI &amp; software development.\",\"sameAs\":[\"https:\\\/\\\/www.linkedin.com\\\/in\\\/sreeram-sreenivasan\\\/\"],\"url\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/author\\\/wordpress\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Limit Download Speed in NGINX - Ubiq BI","description":"Did you know you can limit HTTP bandwidth using NGINX? Here's how to limit download speed in NGINX per connection IP. Use it to control website data usage.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/ubiq.co\/tech-blog\/how-to-limit-download-speed-in-nginx\/","og_locale":"en_US","og_type":"article","og_title":"How to Limit Download Speed in NGINX - Ubiq BI","og_description":"Did you know you can limit HTTP bandwidth using NGINX? Here's how to limit download speed in NGINX per connection IP. Use it to control website data usage.","og_url":"https:\/\/ubiq.co\/tech-blog\/how-to-limit-download-speed-in-nginx\/","og_site_name":"Ubiq BI","article_publisher":"https:\/\/www.facebook.com\/ubiqbi","article_published_time":"2020-11-05T06:18:45+00:00","article_modified_time":"2025-08-25T04:58:30+00:00","og_image":[{"width":640,"height":360,"url":"https:\/\/ubiq.co\/tech-blog\/wp-content\/uploads\/2020\/11\/How-to-Limit-Download-Speed-in-NginX.png","type":"image\/png"}],"author":"Sreeram Sreenivasan","twitter_card":"summary_large_image","twitter_creator":"@UbiqBI","twitter_site":"@UbiqBI","twitter_misc":{"Written by":"Sreeram Sreenivasan","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/ubiq.co\/tech-blog\/how-to-limit-download-speed-in-nginx\/#article","isPartOf":{"@id":"https:\/\/ubiq.co\/tech-blog\/how-to-limit-download-speed-in-nginx\/"},"author":{"name":"Sreeram Sreenivasan","@id":"https:\/\/ubiq.co\/tech-blog\/#\/schema\/person\/db98d49a766a3a111d8510935ab90abc"},"headline":"How to Limit Download Speed in NGINX","datePublished":"2020-11-05T06:18:45+00:00","dateModified":"2025-08-25T04:58:30+00:00","mainEntityOfPage":{"@id":"https:\/\/ubiq.co\/tech-blog\/how-to-limit-download-speed-in-nginx\/"},"wordCount":1030,"image":{"@id":"https:\/\/ubiq.co\/tech-blog\/how-to-limit-download-speed-in-nginx\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2020\/11\/How-to-Limit-Download-Speed-in-NginX.png?fit=640%2C360&ssl=1","keywords":["limit download speed"],"articleSection":["Nginx"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/ubiq.co\/tech-blog\/how-to-limit-download-speed-in-nginx\/","url":"https:\/\/ubiq.co\/tech-blog\/how-to-limit-download-speed-in-nginx\/","name":"How to Limit Download Speed in NGINX - Ubiq BI","isPartOf":{"@id":"https:\/\/ubiq.co\/tech-blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/ubiq.co\/tech-blog\/how-to-limit-download-speed-in-nginx\/#primaryimage"},"image":{"@id":"https:\/\/ubiq.co\/tech-blog\/how-to-limit-download-speed-in-nginx\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2020\/11\/How-to-Limit-Download-Speed-in-NginX.png?fit=640%2C360&ssl=1","datePublished":"2020-11-05T06:18:45+00:00","dateModified":"2025-08-25T04:58:30+00:00","author":{"@id":"https:\/\/ubiq.co\/tech-blog\/#\/schema\/person\/db98d49a766a3a111d8510935ab90abc"},"description":"Did you know you can limit HTTP bandwidth using NGINX? Here's how to limit download speed in NGINX per connection IP. Use it to control website data usage.","breadcrumb":{"@id":"https:\/\/ubiq.co\/tech-blog\/how-to-limit-download-speed-in-nginx\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/ubiq.co\/tech-blog\/how-to-limit-download-speed-in-nginx\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ubiq.co\/tech-blog\/how-to-limit-download-speed-in-nginx\/#primaryimage","url":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2020\/11\/How-to-Limit-Download-Speed-in-NginX.png?fit=640%2C360&ssl=1","contentUrl":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2020\/11\/How-to-Limit-Download-Speed-in-NginX.png?fit=640%2C360&ssl=1","width":640,"height":360,"caption":"limit download speed in nginx"},{"@type":"BreadcrumbList","@id":"https:\/\/ubiq.co\/tech-blog\/how-to-limit-download-speed-in-nginx\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/ubiq.co\/tech-blog\/"},{"@type":"ListItem","position":2,"name":"How to Limit Download Speed in NGINX"}]},{"@type":"WebSite","@id":"https:\/\/ubiq.co\/tech-blog\/#website","url":"https:\/\/ubiq.co\/tech-blog\/","name":"Ubiq BI","description":"Build dashboards &amp; reports in minutes","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ubiq.co\/tech-blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/ubiq.co\/tech-blog\/#\/schema\/person\/db98d49a766a3a111d8510935ab90abc","name":"Sreeram Sreenivasan","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g","caption":"Sreeram Sreenivasan"},"description":"Sreeram Sreenivasan is the Founder of Ubiq. He has helped many Fortune 500 companies in the areas of BI &amp; software development.","sameAs":["https:\/\/www.linkedin.com\/in\/sreeram-sreenivasan\/"],"url":"https:\/\/ubiq.co\/tech-blog\/author\/wordpress\/"}]}},"jetpack_featured_media_url":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2020\/11\/How-to-Limit-Download-Speed-in-NginX.png?fit=640%2C360&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/pbGGTT-xm","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/posts\/2068","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/comments?post=2068"}],"version-history":[{"count":28,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/posts\/2068\/revisions"}],"predecessor-version":[{"id":9284,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/posts\/2068\/revisions\/9284"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/media\/2077"}],"wp:attachment":[{"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/media?parent=2068"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/categories?post=2068"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/tags?post=2068"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}