Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
2 changes: 1 addition & 1 deletion extra-things.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@ make
sudo make install
```

![img_8.png](img_8.png)
![img_8.png](docs/images/img_8.png)
40 changes: 14 additions & 26 deletions frankenphp.md
Original file line number Diff line number Diff line change
Expand Up @@ -228,16 +228,16 @@ This approach keeps your Caddyfile clean while allowing per-deployment customiza

### Load Testing FrankenPHP Services

**Test FrankenPHP (Regular Mode):**
**Test FrankenPHP (Regular Mode - Database):**

```bash
make k6-franken-products
make k6-franken-products-db
```

**Test FrankenPHP Worker Mode:**
**Test FrankenPHP Worker Mode (Database):**

```bash
make k6-franken-worker-products
make k6-franken-worker-products-db
```

### Monitoring FrankenPHP Performance
Expand Down Expand Up @@ -285,12 +285,12 @@ curl http://localhost:2020/metrics | grep frankenphp
**Step 1: Baseline Testing**

```bash
# Test regular FrankenPHP
make k6-franken-products
# Test regular FrankenPHP (database)
make k6-franken-products-db
# Check results in k6/report-franken-*.html

# Test worker mode
make k6-franken-worker-products
# Test worker mode (database)
make k6-franken-worker-products-db
# Check results in k6/report-worker-*.html
```

Expand Down Expand Up @@ -420,7 +420,7 @@ OPTIMAL_WORKERS=$(($AVAILABLE_RAM / $PHP_MEMORY_LIMIT))
# Example: 13984MB / 512MB = ~27 workers

# Test with your existing setup
make k6-franken-worker-products # Baseline test
make k6-franken-worker-products-db # Baseline test
# Then adjust num in Caddyfile and retest
```

Expand Down Expand Up @@ -512,7 +512,7 @@ make k6-franken-worker-products-db

Check Grafana

![img_9.png](img_9.png)
![img_9.png](docs/images/img_9.png)

### Dynamic Worker Scaling

Expand Down Expand Up @@ -573,44 +573,32 @@ existing Makefile targets for consistent and reproducible testing.

```bash
# Products testing
make k6-franken-products # Test products endpoint
make k6-franken-products-db # Test products DB endpoint
make k6-franken-products-db # Test products DB endpoint
make k6-franken-products-redis # Test products Redis endpoint

# Customers testing
make k6-franken-customers # Test customers endpoint
make k6-franken-customers-db # Test customers DB endpoint
make k6-franken-customers-redis # Test customers Redis endpoint

# Orders testing
make k6-franken-orders # Test orders endpoint
make k6-franken-orders-db # Test orders DB endpoint
make k6-franken-orders-redis # Test orders Redis endpoint

# Blog testing
make k6-franken-blog # Test blog endpoint
```

#### FrankenPHP Worker Mode (Port 444)

```bash
# Products testing
make k6-franken-worker-products # Test products endpoint
make k6-franken-worker-products-db # Test products DB endpoint
make k6-franken-worker-products-redis # Test products Redis endpoint

# Customers testing
make k6-franken-worker-customers # Test customers endpoint
make k6-franken-worker-customers-db # Test customers DB endpoint
make k6-franken-worker-customers-redis # Test customers Redis endpoint

# Orders testing
make k6-franken-worker-orders # Test orders endpoint
make k6-franken-worker-orders-db # Test orders DB endpoint
make k6-franken-worker-orders-redis # Test orders Redis endpoint

# Blog testing
make k6-franken-worker-blog # Test blog endpoint
```

### Batch Testing Commands
Expand Down Expand Up @@ -638,9 +626,9 @@ make k6-all-environments
#### Step 1: Individual Endpoint Testing

```bash
# Test products endpoint on both FrankenPHP modes
make k6-franken-products
make k6-franken-worker-products
# Test products endpoint on both FrankenPHP modes (database)
make k6-franken-products-db
make k6-franken-worker-products-db

# Compare results in generated HTML reports
# Check: k6/report-*.html files
Expand Down
20 changes: 10 additions & 10 deletions projections.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Below are two diagrams illustrating the CQRS architecture:

---

![img_7.png](img_7.png)
![img_7.png](docs/images/img_7.png)

*In this diagram:*
- **Command Handlers** process user commands and update the **Command Model**.
Expand All @@ -16,7 +16,7 @@ Below are two diagrams illustrating the CQRS architecture:

---

![img_6.png](img_6.png)
![img_6.png](docs/images/img_6.png)

*In this diagram:*
- Commands update the **Write DB**.
Expand Down Expand Up @@ -54,7 +54,7 @@ Go to http://localhost:3000/dashboards

Click `PHP-FPM Performance Dashboard`

![img_1.png](img_1.png)
![img_1.png](docs/images/img_1.png)

1. Select Datasource to Prometheus
2. Select Pool to www
Expand All @@ -70,7 +70,7 @@ Go to http://localhost:3000/dashboards

Click `PHP-FPM Performance Dashboard`

![img_1.png](img_1.png)
![img_1.png](docs/images/img_1.png)

1. Select Datasource to Prometheus
2. Select Pool to www
Expand All @@ -86,7 +86,7 @@ Go to http://localhost:3000/dashboards

Click `Caddy`

![img.png](img.png)
![img.png](docs/images/img.png)

1. Select Job to `Caddy`
2. Select instance to `franken:2019`
Expand All @@ -104,7 +104,7 @@ Go to http://localhost:3000/dashboards

Click `Caddy`

![img.png](img.png)
![img.png](docs/images/img.png)

1. Select Job to `Caddy`
2. Select instance to `franken-worker:2019`
Expand All @@ -122,7 +122,7 @@ Go to http://localhost:3000/dashboards

Click `Caddy`

![img_2.png](img_2.png)
![img_2.png](docs/images/img_2.png)

1. Select Job to `Caddy`
2. Select instance to `franken-worker:2019`
Expand All @@ -141,7 +141,7 @@ Go to http://localhost:3000/dashboards

Click `Caddy`

![img_3.png](img_3.png)![img.png](img.png)
![img_3.png](docs/images/img_3.png)![img.png](docs/images/img.png)

1. Select Job to `Caddy`
2. Select instance to `franken-worker:2019`
Expand All @@ -159,7 +159,7 @@ try see again http://localhost:3000/dashboards

it will have slow response time

![img_4.png](img_4.png)
![img_4.png](docs/images/img_4.png)

let's scale the num of workers in Caddyfile

Expand Down Expand Up @@ -190,7 +190,7 @@ make down-worker && make up-worker

after changes you will see in the dashboard from FrankenPHP Metrics section

![img_5.png](img_5.png)
![img_5.png](docs/images/img_5.png)

retry again the k6 to see different in Grafana worker dashboard

Expand Down
Loading