• 0

How to rate limit a web server?


Question

I've noticed whenever I hit too many links on LinkedIn, it gives me an HTTP 429 error.  Apparently this is their version of a rate limit notice.

It's rather interesting and I would like to do similar things on my own server. I have a basic Apache Web server at home and I'm wondering how I could configure it to perform a rate limit. I guess the operating system or Apache would have to identify the individual and not can convoluted with other peoples traffic and then once they've access too many pages in a given amount of time, a generic HTML page is presented rather than the dynamic PHP content.

 

Any advice would be appreciated. I'm not really sure where to start looking for this stuff. I don't think this is done at the PHP level. I suspect it's done at the Apache of operating system level. Even at the firewall level.

Link to comment
https://www.neowin.net/forum/topic/1435050-how-to-rate-limit-a-web-server/
Share on other sites

5 answers to this question

Recommended Posts

  • 0

You’re looking for an apache mod. There are numerous available, a quick Google search brought up plenty of information - but I’m assuming you want more than that, you’d prefer a user here to give their own recommendations :)

You are spot on about this occurring WAY before you get to languages such as PHP, you want this to be implemented when they request is first received.

  • 0

I think so Barrett but I don't really understand how it works. Based on what I'm experiencing, I think either Apache or the operating system is intercepting my connection. Either that or there's some intelligent firewall going on. I'm really fascinated by this technology. I guess LinkedIn gets hit hard every day and they need to rate limit all the users. Kind of lame considering they make so much money every day.

  • 0

You could configure Apache to limit connections with a module for example.

I have an Apache server which only purpose is to serve downloads for a website I run, however to stop bots crawling the site and scraping every file (putting immense load on the server) a module is used (limitipconn_module) that limits the max number of connections per IP address to two.

If someone attempts to download more than two files at once they are simply shown an error message. When one download has finished that person is free to start another download.

To do this you would edit your configuration file to load the module and configure the desired options:

# Limit to two Connections
LoadModule limitipconn_module modules/mod_limitipconn.so
<IfModule limitipconn_module>
MaxConnPerIP 2
</IfModule>

This could potentially be an issue if two users we're behind a CGNAT on the same ISP and therefor shared the same WAN IP address, however my site is no LinkedIn so that's very unlikely to happen. However I thought it was worth brining up a potential limitation of doing that.

You can also increase / decrease the request per second on Apache: https://ubiq.co/tech-blog/increase-apache-requests-per-second/

LinkedIn will be load balancing the traffic, using a Web Application Firewall (WAF) to analyse traffic and then either allow or deny it, probably a whole lot more also.

  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Win11Debloat 06.11.2026 by Razvan Serea Win11Debloat is a lightweight, easy to use PowerShell script that allows you to quickly declutter and customize your Windows experience. It can remove pre-installed bloatware apps, disable telemetry, remove intrusive interface elements and much more. The script also includes many features that system administrators and power users will enjoy. Such as a powerful command-line interface, support for Windows Audit mode and the option to make changes to other Windows users. All changes made by Win11Debloat can be easily reversed, and most removed apps can be restored via the Microsoft Store. A full guide on how to undo the changes is available here. Win11Debloat features: Below is an overview of the key features and functionality offered by Win11Debloat. Please refer to the wiki for more information about the default settings preset. Remove a wide variety of preinstalled apps. Click here for more info. Disable telemetry, diagnostic data, activity history, app-launch tracking & targeted ads. Disable tips, tricks, suggestions & ads across Windows. Disable Windows location services & app location access. Disable Find My Device location tracking. Disable 'Windows Spotlight' and tips & tricks on the lock screen. Disable 'Windows Spotlight' desktop background option. Disable ads, suggestions and the MSN news feed in Microsoft Edge. Hide Microsoft 365 ads on the Settings 'Home' page, or hide the 'Home' page entirely. Disable & remove Microsoft Copilot. Disable Windows Recall. Disable Click to Do, AI text & image analysis tool. Prevent AI service (WSAIFabricSvc) from starting automatically. Disable AI Features in Edge. Disable AI Features in Paint. Disable AI Features in Notepad. Disable the Drag Tray for sharing & moving files. Restore the old Windows 10 style context menu. Turn off Enhance Pointer Precision, also known as mouse acceleration. Disable the Sticky Keys keyboard shortcut. Disable Storage Sense automatic disk cleanup. Disable fast start-up to ensure a full shutdown. ...and more. Once you’ve downloaded the Win11Debloat file (Get.ps1), just follow these quick steps: Locate the Get.ps1 script file. Right-click the file and select Run with PowerShell from the context menu. If prompted by User Account Control (UAC), select Yes to grant the script the necessary administrative permissions. Win11Debloat 06.11.2026 fixes: Fix lock screen spotlight option being disabled when disabling the start recommended section by @Raphire in #619 Fix log message formatting by @Raphire Note The -RemoveCommApps and -RemoveW11Outlook command-line parameters for uninstalling a few specific apps have been removed with this release. If you previously relied on these parameters, please see this wiki page for alternative methods of removing these apps. Download: Win11Debloat 06.11.2026 | Open Source View: Win11Debloat Home Page | Screenshots 1| 2 Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • Yes for me, I installed 'old calculator' (Windows 7 calculator) in its place since it is more useful to me. I think paint is the only one I left installed
    • eh I'll wait for the June 2026 MVS ISO downloads which should be coming out next Tuesday June 16 and possibly contain build 8655 instead of 8653
  • Recent Achievements

    • Rookie
      restore went up a rank
      Rookie
    • Very Popular
      AndrewSteel earned a badge
      Very Popular
    • Veteran
      Taliseian went up a rank
      Veteran
    • One Month Later
      Clizby earned a badge
      One Month Later
    • One Month Later
      Timaximus earned a badge
      One Month Later
  • Popular Contributors

    1. 1
      +primortal
      509
    2. 2
      +Edouard
      162
    3. 3
      PsYcHoKiLLa
      155
    4. 4
      ATLien_0
      82
    5. 5
      Steven P.
      79
  • Tell a friend

    Love Neowin? Tell a friend!