• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

http_load Command Examples in Linux

by admin

http_load is a command-line tool that allows you to benchmark the performance of a web server by performing multiple HTTP requests in parallel. It is designed to test the throughput of a web server by simulating multiple clients accessing it simultaneously. It can be used to test the performance of a web server under a heavy load, and to identify any bottlenecks or issues that may occur.

http_load is a simple tool to use, it takes a list of URLs and a number of parallel connections as input, and then sends HTTP requests to the specified URLs using the specified number of parallel connections. It then provides statistics on the number of requests made, the number of errors encountered, the time taken for each request, and the overall throughput of the server.

Here’s an example of how you might use http_load:

Benchmark a web server using 10 parallel connections:

# http_load -parallel 10 -seconds 10 /path/to/urls.txt

In this example, http_load will send requests to the URLs listed in the file urls.txt using 10 parallel connections for a total of 10 seconds. http_load also provides options such as -rate to limit the number of requests per second, -fetches to limit the number of fetches, -verbose to show more detailed information of the requests, and -header to add headers to the request.

http_load Command Examples

1. Emulate 20 requests based on a given URL list file per second for 60 seconds:

# http_load -rate 20 -seconds 60 /path/to/urls.txt

2. Emulate 5 concurrent requests based on a given URL list file for 60 seconds:

# http_load -parallel 5 -seconds 60 /path/to/urls.txt

3. Emulate 1000 requests at 20 requests per second, based on a given URL list file:

# http_load -rate 20 -fetches 1000 /path/to/urls.txt

4. Emulate 1000 requests at 5 concurrent requests at a time, based on a given URL list file:

# http_load -parallel 5 -fetches 1000 path/to/urls.txt

Filed Under: Linux

Some more articles you might also be interested in …

  1. lsinitramfs: Listing the contents of the initrd file system.
  2. How to Configure ACL(Access Control Lists) in Linux FileSystem
  3. “-bash: firewall: command not found” – How to resolve in CentOS/RHEL 7
  4. flameshot Command Examples in Linux
  5. CentOS / RHEL 6 : Lock User Account After N Number of Incorrect Login Attempts
  6. findfs: command not found
  7. grep: command not found
  8. autoconf: Generate configuration scripts to automatically configure software source code packages
  9. lvremove failing to remove volume after using ‘shred’ command
  10. guix package Command Examples in Linux

You May Also Like

Primary Sidebar

Recent Posts

  • csslint: A linter for CSS code
  • csh: The shell (command interpreter) with C-like syntax (Command Examples)
  • csc: The Microsoft C# Compiler (Command Examples)
  • crystal: Tool for managing Crystal source code

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright