Add top level links to "Contributing" section and move up Load testing "Results" (#2779)

- Add top level links to the "Seeding Data" and "API for contributors" doc pages
- Move "Results" section in "Loading testing" closer to the top of document
This commit is contained in:
Noah Talerman 2021-11-05 10:03:05 -04:00 committed by GitHub
parent 40de2cd266
commit 8e3c4ac67f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 36 additions and 30 deletions

View File

@ -2,43 +2,16 @@
The following document outlines the most recent results of a semi-annual load test of the Fleet server. These tests are conducted by the Fleet team.
Fleet uses [osquery-perf](https://github.com/fleetdm/fleet/tree/main/cmd/osquery-perf), a free and open source tool, to generate realistic traffic to the Fleet server.
A test is deemed successful when the Fleet server is able to receive and make requests to the specified number of hosts without over utilizing the specified resources. In addition, a successful test must report that the Fleet server can run a live query against the specified number of hosts.
This document reports the minimum resources for successfully running Fleet with 1,000 hosts and 150,000 hosts.
This document reports the minimum resources for successfully running Fleet with 1,000 hosts and 150,000 hosts.
Fleet uses [osquery-perf](https://github.com/fleetdm/fleet/tree/main/cmd/osquery-perf), a free and open source tool, to generate realistic traffic to the Fleet server.
## Test parameters
The Fleet load tests are conducted with a Fleet server that contains 2 packs, with ~6 queries each, and 6 labels.
## How we are simulating osquery
The simulation is run by using [osquery-perf](https://github.com/fleetdm/fleet/tree/main/cmd/osquery-perf).
The following command enrolls and simulates 150,000 hosts on Fleet:
```bash
go run cmd/osquery-perf/agent.go -enroll_secret <secret here> -host_count 150000 -server_url <server URL here> -node_key_file nodekeys
```
After the hosts have been enrolled, you can add `-only_already_enrolled` to make sure the node keys from the file are used and no enrollment happens. This resumes the execution of all the simulated hosts.
## Infrastructure setup
The deployment of Fleet was done through the example [terraform provided in the repo](https://github.com/fleetdm/fleet/tree/main/tools/terraform) with the following command:
```bash
terraform apply \
-var domain_fleetctl=<your domain here> \
-var domain_fleetdm=<alternative domain here> \
-var s3_bucket=<log bucket name> \
-var fleet_image="fleetdm/fleet:<tag targeted>" \
-var vulnerabilities_path="" \
-var fleet_max_capacity=100 \
-var fleet_min_capacity=5
```
## Results
### 1,000 hosts
@ -77,6 +50,33 @@ MySQL:
The above setup auto scaled based on CPU usage. After a while, the task count ended up in 25 instances even while live querying or adding a new label.
## How we are simulating osquery
The simulation is run by using [osquery-perf](https://github.com/fleetdm/fleet/tree/main/cmd/osquery-perf).
The following command enrolls and simulates 150,000 hosts on Fleet:
```bash
go run cmd/osquery-perf/agent.go -enroll_secret <secret here> -host_count 150000 -server_url <server URL here> -node_key_file nodekeys
```
After the hosts have been enrolled, you can add `-only_already_enrolled` to make sure the node keys from the file are used and no enrollment happens. This resumes the execution of all the simulated hosts.
## Infrastructure setup
The deployment of Fleet was done through the example [terraform provided in the repo](https://github.com/fleetdm/fleet/tree/main/tools/terraform) with the following command:
```bash
terraform apply \
-var domain_fleetctl=<your domain here> \
-var domain_fleetdm=<alternative domain here> \
-var s3_bucket=<log bucket name> \
-var fleet_image="fleetdm/fleet:<tag targeted>" \
-var vulnerabilities_path="" \
-var fleet_max_capacity=100 \
-var fleet_min_capacity=5
```
## Limitations
The [osquery-perf](https://github.com/fleetdm/fleet/tree/main/cmd/osquery-perf) tool doesn't simulate all data that's included when a real device communicates to a Fleet instance. For example, system users and software inventory data are not yet simulated by osquery-perf.

View File

@ -15,5 +15,11 @@ Contains information about how to merge changes into the codebase
### [Releasing Fleet](./05-Releasing-Fleet.md)
Provides a guide for Fleet's release process
### [Seeding Data](./06-Seeding-Data.md)
Provides a guide for adding fake data to your development instance
### [API for contributors](./07-API-for-contributors.md)
Provides documentation for Fleet API routes that are helpful when developing or contributing to Fleet
### [FAQ](./FAQ.md)
Includes commonly asked questions and answers about contributing to Fleet from the Fleet community