derpycoder

derpycoder

Bandit server for Phoenix is next level, check it out!

Hey Guys,

Did you know that there’s an alternative to Cowboy for Phoenix, called Bandit?

And it recently reached {:bandit, "~> 1.0-pre"} version!

Here’s my observation:


In Cowboy based phoenix builds, I noticed that there’s a delay before the websocket connection happened.

As you can notice in the gif below. Other pages load within 100ms, however the websocket connection reaches close to 435ms:

Cowboy


That doesn’t happen with Bandit!

All the resources, along with the socket connection happen within 100ms!
Bandit


Check it out:
https://github.com/mtrudel/bandit

Most Liked

mtrudel

mtrudel

Creator of Bandit

I’m here if anyone has any specific blocking issues for adoption at your shops!

31
Post #4
hubertlepicki

hubertlepicki

I’m already using it in production. It works. The performance is about the same in my use case.

On the plus side, Bandit is built on top of OTP primitives and doesn’t do the annoying silent crashes that Cowboy does.

On the downside, it’s still fairly young, and there are rough edges. Pre-9 version had some breaking bugs, the current (pre-10) version seems okay but some behaviors differ from Cowboy like the lack of interrupting requests when client drops off. We also observed increased memory usage, but these things can be related to one another.

Generally, it looks like it’s the future, and at some point should probably be the default over Cowboy, but you should use it with caution on production (I’m hovering my hand over the switch back to Cowboy just in case for now).

16
Post #2
mtrudel

mtrudel

Creator of Bandit

@hubertlepicki and others; 1.3.0 just went out with a fix for the long-standing issue of increasing memory use (which wasn’t really a memory issue so much as it was an issue with how memory use is reported, but anyway), along with a few other fixes. See CHANGELOG as always. Hopefully this fixes your issue; please report back if so as I’d love to have more evidence that we’ve finally licked this.

Where Next?

Popular in Discussions Top

cvkmohan
The upcoming Phoenix 1.6 release looks very interesting. Became a habit to watch the commits - and - what they are bringing in. phx.gen...
New
pillaiindu
In django there is a cache framework backed by memcached. Rails also puts a lot of emphasis on caching, and even the idea of russian-doll...
New
mmport80
I have put far too much effort into Dialyzer over the last year or so - and basically - I doubt it’s worth the effort. It’s not as easy ...
New
crabonature
I’m still quite new to Elixir. As I understand we got in Elixir “multi guards” as convention to simplify one large guard with or’s?: de...
New
nburkley
AWS re:Invent is on at the moment with some interesting announcements. One new feature in particular is the Lambda Runtime API for AWS La...
New
ejpcmac
I have discovered Nix last month and I am currently on my way to migrating to it—both on macOS at home and the full NixOS distrubution at...
New
IVR
Hi all, I’ve seen a number of related threads in the past, but I’d still be very curious to hear an up-to-date opinion on this topic. I...
New
PragTob
Hey everyone, this has been on my mind for some time and I’d love your input on it! TLDR: I feel like maps are superioer for storing and...
New
Qqwy
I would like to spark a discussion about the static access operator: .. For whom does not know: it is used in Elixir to access fields of...
New
Markusxmr
Since Drab has been developed for a while in the open, introducing the Liveview functionality in a way it happend appears to undermine th...
New

Other popular topics Top

vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
AstonJ
Posting this to see if we can make things easier for people to get into Neovim. If you use Neovim and have a favourite distro please let ...
New
chrismccord
This release brings a number of exciting features, including integration with the new Phoenix LiveDashboard and Phoenix LiveView. There h...
New
gausby
I asked this very same question on twitter and got some interesting feedback, but I thought it would be a good question to ask here as we...
1207 39467 209
New
vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
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
boundedvariable
I am going through the kafka architecture. All the features what the kafka is providing are already in Erlang. I would like hear your opi...
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
vegabook
I’m brand new to Phoenix and I have stripped one of the demo applications to the bone. I just want to get an svg up on the screen. Here i...
New
vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New

Latest on Elixir Forum

Elixir Forum

We're in Beta

About us Mission Statement