Nginx
Reverse proxy configuration, TLS/SSL termination with Certbot, load balancing, and static asset HTTP caching.
1 / Reverse Proxy and TLS
Nginx served as the reverse proxy, TLS terminator, and static asset server in production deployments. In Trajectory's AWS deployment, Nginx sat in front of the Spring Boot application server, handling SSL termination with Certbot-managed Let's Encrypt certificates and proxying requests to the backend.
2 / Configuration Lessons
The most important Nginx lesson was proper WebSocket proxy configuration. Standard HTTP proxy settings do not support the WebSocket protocol upgrade — explicit `proxy_set_header Upgrade $http_upgrade` and `proxy_set_header Connection "upgrade"` directives are required. Missing these headers causes WebSocket connections to fail after the initial HTTP handshake, which is notoriously difficult to debug.
3 / Static Asset Caching
Nginx's HTTP caching configuration for static assets — CSS, JavaScript bundles, images — reduced backend load and improved page load performance. Cache headers with appropriate `max-age` values and cache-busting filename strategies (content hashes in filenames) ensured users received fresh assets after deployments without unnecessary cache invalidation.
