pistacheio / pistache

A high-performance REST toolkit written in C++
https://pistacheio.github.io/pistache/
Apache License 2.0
3.12k stars 690 forks source link

Problem With ReusePort and ReuseAdrr #1079

Closed samrajput1143 closed 2 years ago

samrajput1143 commented 2 years ago

I have created two different server that are using same port and same address. The only difference one server is handling get request and other handling delete request request. The code successfully build, but on testing both the server with CURL command getting HTTP 404 not found.

dennisjenkins75 commented 2 years ago

https://lwn.net/Articles/542629/

Your HTTP requests are being randomly routed to the two processes. If you want separate threadpools or separate processes for each API, then use a different TCP port for each.

samrajput1143 commented 2 years ago

ok Got it, I will changes the design. thanks a lot @dennisjenkins75 .