Skip to main content

Skip the nginx sidecar

By default, instance-based (EC2) scopes run an nginx sidecar in front of your application. The load balancer sends traffic to nginx, and nginx proxies it to your container. Setting NP_SKIP_NGINX=true removes that sidecar so the balancer reaches your application directly.

note

This applies to instance-based (EC2) scopes only. It's a runtime setting on the underlying AMI.

When to use it

Skip the sidecar when your application already handles everything nginx would do for it, for example TLS termination, header rewriting, or its own reverse proxy. Removing the extra hop simplifies the request path and gives your app full control over the connection.

💡 Tip: If you're not sure whether you need it, keep the sidecar. It's the default for a reason: it's what produces your HTTP metrics and traffic logs (see What changes below).

Enable it

NP_SKIP_NGINX is read from your application parameters. Create an environment variable parameter delivered to your container with the value true:

NP_SKIP_NGINX=true

Once it's set, the next deployment brings up the scope without the nginx container.

Application port

Without the sidecar, the balancer targets your application container directly on port 8080, so your app must listen on 8080.

If your application listens on a different port, remap it with NP_APP_CONTAINER_EXTRA_PORTS and make sure the mapping keeps 8080 as the host (balancer-facing) port, for example 8080:3000. See Exposing additional ports on your instance for the format.

What changes

The nginx sidecar is what produces your HTTP-level observability. When you skip it, two things stop:

  • HTTP metrics (aggregated request/latency/status metrics) are no longer produced.
  • Traffic logs are no longer produced.

Your application logs keep working as usual.

warning

HTTP metrics and traffic logs are a core part of the nullplatform experience and your troubleshooting toolkit. Only skip the sidecar when your application genuinely replaces what nginx does, and know that you'll lose that HTTP-level visibility.

Next steps

  • Capabilities: configure hardware and runtime settings for legacy scopes
  • Scope management: manage ports, balancers, and other instance settings
  • Legacy scopes: overview of Kubernetes, EC2, and Lambda legacy scope types