PeterDavidCarter

PeterDavidCarter

If Nginx can only handle 10K connections and Cowboy 2M

Shouldn’t there be something additional configurable as a reverse proxy that handles 2M connections? Especially since there are complexities about properly supporting Content Security Policy headers with Safari and Nginx. Not that Nginx is bad; it’s fine. But just wondering.

Most Liked

OvermindDL1

OvermindDL1

Who said nginx can only handle 10k connections? I’m pretty sure that is configurable…

benwilson512

benwilson512

Author of Craft GraphQL APIs in Elixir with Absinthe

Everyone is talking past each other here. Whether or not NGINX can respond to more regular HTTP requests per second than cowboy I don’t think is a useful metric. NGINX is very fast, nobody is disputing that.

However, the ability to get a new connection, reply quickly, and then drop it (regular HTTP) does not imply that it will hold several hundred thousand connections open indefinitely with reasonable RAM usage. Maybe it will! My point is simply that the wrk benchmark offers no evidence of that behaviour, because it doesn’t test that behaviour.

@NobbZ NGINX can definitely reverse proxy web socket connections, but I too don’t know about what the resource consumption of doing so is.

All in all it’s a good question, although notably you could just cut NGINX out of the picture entirely by not using a reverse proxy. For our production servers for example we just run cowboy on 8080, and then the AWS load balancer routes port 80 traffic to 8080.

NobbZ

NobbZ

wrk is known to have problems with cowboy and applications based on that.

Running the tool to measure on the same host as the thing you measure is a bad idea as well.

Where Next?

Popular in Questions Top

sergio
In Ruby, I can go: User.find_by(email: "foobar@email.com").update(email: "hello@email.com") How can I do something similar in Elixir? ...
New
_russellb
I want to try my hand at web scraping. What tools/libraries do I need to use. I’m hoping to turn this into something professional so don’...
New
siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New
qwerescape
Is there a way to get the call stack or stack trace at any point in the code? Not from exceptions, but an expression that returns how the...
New
albydarned
Hello all! I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
New
Fl4m3Ph03n1x
About me? ( if you have nothing better to do than reading about some random guy in the internet :stuck_out_tongue: ) Hello all, this is ...
New
fireproofsocks
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? Ecto.Repo — Ecto v3.14.0 has exampl...
New
JulienCorb
I am trying to implement my new.html.eex file to create new posts on my website. new.html.eex: <h1>Create Post</h1> <%= ...
New
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New
nobody
Hi! In PHP: $_SERVER[‘SERVER_ADDR’] - in Elixir? Searched the docs for ip address and the web, no good results. Thanks!
New

Other popular topics Top

skosch
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
New
Fl4m3Ph03n1x
About me? ( if you have nothing better to do than reading about some random guy in the internet :stuck_out_tongue: ) Hello all, this is ...
New
josevalim
Hi everyone, One of the features added to Elixir early on to help integration with Erlang code was the idea of overridable function defi...
New
freewebwithme
Using vs code and installed ElixirLS: support and debugger. And I got an error popped up on start up says Failed to run ‘elixir’ comma...
New
AstonJ
Please see the new poll here: Which code editor or IDE do you use? (Poll) (2022 Edition) It’s been a while since we first asked this, I...
208 31265 143
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
saif
Hello everyone, Long time lurker first time poster here. I’ve recently begun working on Elixir full-time again! :raised_hands: It’s been...
New
komlanvi
Hi everyone, I was playing with phoenix liveView but I run into an issue. I have a form and want to validate each input text when the te...
New
shijith.k
I am trying to start a new phoenix project with elixir 1.9, but mix phx.new does not work. It says that ** (Mix) The task "phx.new" could...
New
dokuzbir
I want to highlight html closing tags when i click a html tag. That works in .html files but doesnt work for html.eex templates. How can...
New

We're in Beta

About us Mission Statement