kodepett

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

  1. 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)
  2. Can I use ETS for sessions - there’s no way to send a cookie to handset(USSD)
  3. Do I have to tune my linux kernel to handle 10k request. (I know feel kernel parameters for TCP)
  4. 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

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

benwilson512

Author of Craft GraphQL APIs in Elixir with Absinthe

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

benwilson512

Author of Craft GraphQL APIs in Elixir with Absinthe

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

axelson

Scenic Core Team

What is 3PP? Tried to Google for it but couldn’t find anything that looked relevant.

kodepett

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.

Where Next?

Popular in Questions Top

gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New
aalberti333
As the title describes, I’m trying to run Enum.map() over a list of key/value pairs, where the value is a map. My data looks like this: ...
New
tduccuong
Hi, is there any work on GUI with Elixir, that is similar to Electron/Javascript? My idea is to bundle Phoenix and BEAM into a single se...
New
fireproofsocks
I’m working on defining a simple Ecto schema for a table (in PostGres), but I don’t see where I can define a column as NOT NULL. Conside...
New
lastday4you
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
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
baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
hpopp
To simplify some tasks at work, I wrote and published this package yesterday. It’s a simple macro that enables Access behaviour on struct...
New
sabri
Can someone explain the settings of pool_size of Ecto in config file? and what is the recommend size? Thanks
New
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New

Other popular topics Top

yurko
Here are few pieces of (common) Linux knowledge that we use for reasonably small one server apps. We use Ubuntu but this should work for ...
New
shahryarjb
Hello, I get Persian date from my client and convert it to normal calendar like this: def jalali_string_to_miladi_english_number(persi...
New
pmjoe
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
New
jononomo
I am trying to figure out how Mix knows whether the environment is test, dev, or prod -- where is this set? Thanks.
New
minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
chensan
I have a User schema with a :from_id field set to type :string: defmodule TweetBot.Repo.Migrations.CreateUsers do use Ecto.Migration ...
New
WestKeys
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New
beno
I will often find my self writing things similar to: case some_value do nil -> something() "" -> something() _ -> someth...
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
Nvim
Elixir appears to be a superior language to Python. I don’t see any advantage of Python over Elixir. Are there any?
New

We're in Beta

About us Mission Statement