kodepett
Phoenix 10k req/sec, ETS
Hi, I’m working on a USSD(*number#) application which will handle 10k concurrent request per second. Incoming request from the gateway will be converted to http request which will be handled by my phoenix application. I need advise on the below
- Can phoenix (cowboy) easily handle 10k concurrent request. (I don’t plan using nginx as a proxy, there won’t be any need for that)
- Can I use ETS for sessions - there’s no way to send a cookie to handset(USSD)
- Do I have to tune my linux kernel to handle 10k request. (I know feel kernel parameters for TCP)
- Which http client library will you recommend (1million request per day to 3PP servers) - I want something close to PHP curl/libcurl.
Thanks.
Most Liked
mindok
This article (https://phoenixframework.org/blog/the-road-to-2-million-websocket-connections) covers websocket connections, but may give you some insights into the ability of Phoenix to scale.
benwilson512
This is a production scenario? Even if you plan to hot upgrade for deployments, single node guarantees unexpected downtime at some point.
You said you’re hitting 3 servers right? If you’re only hitting three servers, why avoid keep alive?
Phoenix will not be your bottleneck. Whether or not the code you write can do 10k req/ sec depends on the code you write.
benwilson512
Yes
In my opinion, not by itself. :ets is single node only, so when you’re running multiple nodes at the same time sessions on node A won’t appear on node B. What kind of information are you storing in the session?
No.
:hackney is sort of the standard, make sure to look at it’s pooling options, if you’re doing it all to the same server over and over you may want a pool per destination endpoint.
axelson
What is 3PP? Tried to Google for it but couldn’t find anything that looked relevant.
kodepett
I checked mint out and as a newbie I was discouraged by the streaming bit, fetch data in chunks, wait and merge after the done tag. I couldn’t find any option to fetch the data directly. I understand it’s a low level api and hence the design. I will take a look at tesla - any example outside the docs. Any reason why tesla might be a better option compared to hackney as the fact that it provides a level of abstraction(nice to work with) and the ability to use different adapters. I’m learning a lot from the community. Thanks.







