# Possible to make preread work for QUIC?

**URL:** <https://community.nginx.org/t/possible-to-make-preread-work-for-quic/6460>\
**Category:** NGINX\
**Tags:** ssl, quic, upstream, http3\
**Created:** [September 1, 2025, 2:39am UTC](https://community.nginx.org/t/possible-to-make-preread-work-for-quic/6460 "2025-09-01T02:39:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![hgl](https://avatars.discourse-cdn.com/v4/letter/h/22d042/32.png) [@hgl](https://community.nginx.org/u/hgl)\
**Post date:** [September 1, 2025, 2:39am UTC](https://community.nginx.org/t/possible-to-make-preread-work-for-quic/6460/1 "2025-09-01T02:39:38Z")

</div>

**My issue:**

I’m experimenting load balancing for a bunch of upstream QUIC servers.  
I wonder if nginx is the right tool for this?

I tried the stream module with the `ssl_preread on` directive.

**How I encountered the problem:**

when doing `curl --http3-only quic2.com`, nginx seemed to always send the traffic to the default upstream `[::1]:444`.

**Solutions I’ve tried:**

**Version of NGINX or NGINX adjacent software (e.g. NGINX Gateway Fabric):**

1.27.5

**Deployment environment:**

**Minimal NGINX config to reproduce your issue**

pid /run/nginx/nginx.pid;  
error\_log stderr;  
daemon off;  
events {}  
stream {  
map $ssl\_preread\_server\_name $upstream {  
default [::1]:444;  
[quic1.com](http://quic1.com) unix:/run/nginx/quic1.sock;  
[quic2.com](http://quic2.com) unix:/run/nginx/quic2.sock;  
}  
server {  
listen 443 reuseport;  
listen [::]:443 reuseport;  
ssl\_preread on;  
proxy\_pass $upstream;  
}  
server {  
listen 443 udp reuseport;  
listen [::]:443 udp reuseport;  
ssl\_preread on;  
proxy\_pass $upstream;  
}  
}

**NGINX access/error log:** _(Tip → You can usually find the logs in the `/var/log/nginx` directory.)_
