diff --git a/README.md b/README.md index d90787c..ff102b1 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,8 @@ can decode. Almost all distributed systems accept payloads in a very specific fo All we needed was a tool that can send load (or specific load) on target TCP servers, read responses from those servers and present a decent :) report. This was an opportunity to build **blast**. **blast** is inspired from [hey](https://github.com/rakyll/hey), which is an HTTP load generator in golang. +**blast** is a very thin CLI with a dependency on [blast-core](https://github.com/SarthakMakhija/blast-core). + ## Features **blast** provides the following features: @@ -69,24 +71,25 @@ All we needed was a tool that can send load (or specific load) on target TCP ser ## Supported flags -| **Flag** | **Description** | -|----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| n | Number of requests to run. **Default is 1000.** | -| c | Number of workers to run concurrently. **Default is 50.** | -| f | File path containing the payload. | -| rps | Rate limit in requests per second per worker. **Default is no rate limit.** | -| z | Duration of the blast to send requests. **Default is 20 seconds.** | -| t | Timeout for establishing connection with the target server. **Default is 3 seconds.** | -| Rr | Read responses from the target server. **Default is false.** | -| Rrs | Read response size is the size of the responses in bytes returned by the target server. | -| Rrd | Read response deadline defines the deadline for the read calls on connection. **Default is no deadline** which means the read calls do not timeout. | -| Rtr | Read total responses is the total responses to read from the target server. The load generation will stop if either the duration (-z) has exceeded or the total responses have been read. This flag is applied only if "Read responses" (-Rr) is true. | -| Rsr | Read successful responses is the successful responses to read from the target server. The load generation will stop if either the duration (-z) has exceeded or the total successful responses have been read. Either of "-Rtr" or "-Rsr" must be specified, if -Rr is set. This flag is applied only if "Read responses" (-Rr) is true.| -| conn | Number of connections to open with the target server. **Default is 1.** | -| cpu | Number of cpu cores to use. **Default is the number of logical CPUs.** +| **Flag** | **Description** | +|----------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| n | Number of requests to run. **Default is 1000.** | +| c | Number of workers to run concurrently. **Default is 50.** | +| f | File path containing the payload. | +| rps | Rate limit in requests per second per worker. **Default is no rate limit.** | +| z | Duration of the blast to send requests. **Default is 20 seconds.** | +| t | Timeout for establishing connection with the target server. **Default is 3 seconds.** | +| Rr | Read responses from the target server. **Default is false.** | +| Rrs | Read response size is the size of the responses in bytes returned by the target server. | +| Rrd | Read response deadline defines the deadline for the read calls on connection. **Default is no deadline** which means the read calls do not timeout. | +| Rtr | Read total responses is the total responses to read from the target server. The load generation will stop if either the duration (-z) has exceeded or the total responses have been read. This flag is applied only if "Read responses" (-Rr) is true. | +| Rsr | Read successful responses is the successful responses to read from the target server. The load generation will stop if either the duration (-z) has exceeded or the total successful responses have been read. Either of "-Rtr" or "-Rsr" must be specified, if -Rr is set. This flag is applied only if "Read responses" (-Rr) is true. | +| conn | Number of connections to open with the target server. **Default is 1.** | +| cpu | Number of cpu cores to use. **Default is the number of logical CPUs.** | + ## FAQs -1. **Can I use blast to only send the load and not worrry about getting the responses back?** +1. **Can I use blast to only send the load and not worry about getting the responses back?** Yes. @@ -144,7 +147,7 @@ The above code creates a protobuf encoded message and writes it to a file. The f [ResponseReader](https://github.com/SarthakMakhija/blast/blob/main/report/response_reader.go) implements one goroutine per `net.Conn` to read responses from connections. The goroutine keeps on reading from the connection, and tracks successful and failed reads. This design means that there will be 1M response reader goroutines if the user -wants to estalish 1M connections and read responses. To handle this, IO multiplexing + pool of ResponseReaders is planned in subsequent release. +wants to establish 1M connections and read responses. To handle this, IO multiplexing + pool of ResponseReaders is planned in subsequent release. 7. **What is the significance of Rrs flag in blast?**