https://github.com/ruisiang/pow-shield-go
Alternate implementation of PoW Shield in Go for stress testing purposes and future optimized production version.
https://github.com/ruisiang/pow-shield-go
ddos ddos-mitigation golang netsec network-security
Last synced: about 1 year ago
JSON representation
Alternate implementation of PoW Shield in Go for stress testing purposes and future optimized production version.
- Host: GitHub
- URL: https://github.com/ruisiang/pow-shield-go
- Owner: RuiSiang
- Created: 2022-08-12T04:42:34.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-09-23T02:20:22.000Z (over 3 years ago)
- Last Synced: 2025-02-23T09:51:20.728Z (over 1 year ago)
- Topics: ddos, ddos-mitigation, golang, netsec, network-security
- Language: Go
- Homepage:
- Size: 35.2 KB
- Stars: 8
- Watchers: 2
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# WIP: PoW Shield Go
Implementation of [PoW Shield](https://github.com/RuiSiang/PoW-Shield) in Go for stress-testing purposes and future production version.
## Usage
### Install the package
```bash
go mod tidy
```
### Run
```bash
go run main.go
```
## Stress Test
Note: This only works on non-containerized version of PoW Shield, and that your system might experience unstability when running the test.
```bash
# Start the stress test
npm run stress
# If you changed the PORT variable in .env, you should also change the target variable in the stress test script
nano scripts/stress.sh
```
_The following tests are are conducted on i7-12700H CPU with a sum of 1 100% utilized core and a 60 second period for each concurrent parameter._
### Mass GET
| Concurrent Connections | Avg Latency | Error Rate | Requests/Second |
| ---------------------: | ----------: | ---------: | --------------: |
| 64 | ms | 0 | |
| 128 | ms | 0 | |
| 256 | ms | 0 | |
| 512 | ms | 0 | |
| 1024 | ms | 0 | |
| 2048 | ms | 0 | |
| 4096 | ms | 0 | |
### Nonce Flood
| Concurrent Connections | Avg Latency | Error Rate | Requests/Second |
| ---------------------: | ----------: | ---------: | --------------: |
| 64 | ms | N/A | |
| 128 | ms | N/A | |
| 256 | ms | N/A | |
| 512 | ms | N/A | |
| 1024 | ms | N/A | |
| 2048 | ms | N/A | |
| 4096 | ms | N/A | |