Skip to content

Commit b8f46a1

Browse files
justin808claude
andcommitted
Add comprehensive Thruster + HTTP/2 architecture documentation
This commit adds a "Key Learnings" section to the Control Plane readme documenting the critical insights from deploying Thruster with HTTP/2. New documentation sections: 1. Protocol Configuration is Critical - Explains the common mistake of using protocol: http2 - Documents why this causes 502 errors 2. Why This Works - Visual diagrams comparing standalone vs Control Plane architecture - Shows how HTTP/2 is terminated at different points 3. What Thruster Provides on Control Plane - Clarifies that Thruster features work with protocol: http - Lists all benefits (caching, compression, early hints, etc.) 4. Debugging Tips - Commands to verify Thruster is running - How to test internal connectivity - Where to check protocol settings This documentation will help future developers avoid the protocol mismatch issue and understand the correct architecture. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 2a51d9a commit b8f46a1

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

.controlplane/readme.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,50 @@ With Thruster and HTTP/2 enabled on Control Plane, you should see:
242242

243243
For detailed Thruster documentation, see [docs/thruster.md](../docs/thruster.md).
244244

245+
### Key Learnings: Thruster + HTTP/2 Architecture
246+
247+
This section documents important insights gained from deploying Thruster with HTTP/2 on Control Plane.
248+
249+
#### Protocol Configuration is Critical
250+
251+
**Common Mistake:** Setting `protocol: http2` in the workload port configuration
252+
**Result:** 502 Bad Gateway with "protocol error"
253+
**Correct Configuration:** Use `protocol: http`
254+
255+
#### Why This Works
256+
257+
Control Plane's architecture differs from standalone Thruster deployments:
258+
259+
**Standalone Thruster (e.g., VPS):**
260+
```
261+
User → HTTPS/HTTP2 → Thruster → HTTP/1.1 → Rails
262+
(Thruster handles TLS + HTTP/2)
263+
```
264+
265+
**Control Plane + Thruster:**
266+
```
267+
User → HTTPS/HTTP2 → Control Plane LB → HTTP/1.1 → Thruster → HTTP/1.1 → Rails
268+
(LB handles TLS) (protocol: http) (HTTP/2 features)
269+
```
270+
271+
#### What Thruster Provides on Control Plane
272+
273+
Even with `protocol: http`, Thruster still provides:
274+
- ✅ Asset caching and compression
275+
- ✅ Efficient static file serving
276+
- ✅ Early hints support
277+
- ✅ HTTP/2 multiplexing features (via Control Plane LB)
278+
279+
The HTTP/2 protocol is terminated at Control Plane's load balancer, which then communicates with Thruster via HTTP/1.1. Thruster's caching, compression, and early hints features work regardless of the protocol between the LB and container.
280+
281+
#### Debugging Tips
282+
283+
If you encounter 502 errors:
284+
1. Verify Thruster is running: `cpln workload exec ... -- cat /proc/1/cmdline`
285+
2. Test internal connectivity: `cpln workload exec ... -- curl localhost:3000`
286+
3. Check protocol setting: Should be `protocol: http` not `http2`
287+
4. Review workload logs: `cpln workload eventlog <workload> --gvc <gvc> --org <org>`
288+
245289
## Other notes
246290

247291
### `entrypoint.sh`

0 commit comments

Comments
 (0)