brightball

brightball

With the trending news that nginx has been acquired by F5 (Nginx to Be Acquired by F5 Networks | Hacker News) it sparked the natural discussion of nginx alternatives despite F5 committing to the continued open source project development.

That got me wondering what it would take to utilize Cowboy standalone as a replacement for nginx for people who aren’t using Erlang/Elixir? Are there guides out there for it? Would it be viable?

If so it seems like this would be a very good opportunity to position Cowboy as an alternative, which would realistically generate more investment and development in the project…and as a likely byproduct create more interest in the BEAM ecosystem as a whole to a wider audience.

If Cowboy is a viable replacement, this would seem to be a rare “preparation meets opportunity” moment.

Showing Posts 1 to 7

Fl4m3Ph03n1x

Fl4m3Ph03n1x

I don’t see how Cowboy can be compared to nginx. nginx is (mainly) a load balancer in the sense it sends load (requests) to different machines. cowboy is a library that receives requests from clients specific to languages using BEAM.

Even if you could convince everyone that installing an entire new VM to replace nginx is a good idea, I still don’t see how it would fit.

Julio

Julio

If your stack is not full Erlang/Elixir, would suggest to use Traefik as a replacement of Nginx

lpil

lpil

Creator of Gleam

Both GitHub and Heroku use Cowboy in a place where people might more commonly use Nginx (file server, reverse proxy), so is can be used in this fashion.

I suspect we’d never be able to fill the shoes of Nginx as deployment of Cowboy/the BEAM is considerably more fiddly than deploying Nginx.

Fl4m3Ph03n1x

Fl4m3Ph03n1x

How interesting. Do you have any articles referencing this?

@Julio Welcome to the community! We hope you enjoy. Also, thanks for Traefik, look cool!

lpil

lpil

Creator of Gleam

I’m afraid not, but Heroku have made some of the code public.

https://github.com/heroku/vegur

https://github.com/heroku/cowboyku

There is also a book on running Erlang at scale from Fred Hebert back when he was at Heroku Be the Erlang Medic in a Time of War: New Book | Heroku

easco

easco

I cannot speak to using Cowboy as a full-featured replacement for nginx. I admit to be largely ignorant of the full scope of how nginx is “typically” employed.

However, I have had some good luck replacing functionality of tools like nginx and Apache in some of our systems through Cowboy in paths that lead to Phoenix applications.

For example, we found it was most convenient when writing the router and follow on code for a Phoenix application for that code to assume it was running at the root domain of a site. However, in production we wanted to run the application behind a Kubernetes Ingress controller that addressed the application other than the root domain. The problem is that the ingress controller would, or would not, strip off the non-root path for us as the folks administering it changed things over time. Frustrated what we did was write some Cowboy middleware that made our application agnostic as to whether or not the initial path component was included by the ingress controller.

Essentially we created a rewrite rule in Cowboy. It was implemented in code, which meant it wasn’t as convenient as changing a config file (as one might do for a rewrite rule in nginx or Apache) but it was possible.

Based on that kind of experience, I suspect you could add a configuration layer to Cowboy and perhaps develop a set of stackable Cowboy middleware to add proxying and rewrite capabilities through (for example) config files.

danyalmh

danyalmh

Yes in Where you need More than a single round-robin :grin: .

For example I have 6 Node and each
Handling Some Special user for
Example you think Node-A handle
User live in New York and those
Study in College X .

Because this node have To much Data about City and many other Things , and i not
Want all 6 machine Store All Data From each City and be replicate of other …

This Model need a Powerful routing system.
I believe Heroku Have like this idea and choice Beam instead of Ngnix

This case is to much great in Erlang
Because can use built-in Stable , real-time Db ( mnesia )
And Beam is To much Stable in Multi core
Under high-load ( Powered by GC per process )

And many other feature …

— All posts loaded —

Where Next? Top

Trending in Discussions Top

wmnnd
Hey folks, I wanted to share with you a project I’ve been working on for a while: It’s an Open Source (AGPLv3) newsletter tool. Think Ma...
New
axelson
Hi there! :wave: @frigidcode and I (but mostly him) have been running an Elixir Book club, we’re almost done with Designing Elixir Syste...
New
alexslade
Fly’s CEO posted this recently - Turn And Face The Strange · The Fly Blog It says that Fly is going all-in on sprites, which is a worry ...
New
sntran
In my third year of college, around 2010, I found Erlang. A few years later, I found Elixir. I liked the ideas at once: many small proces...
New
Ganna
Hi everyone, I have 8 years of production experience with Erlang/OTP and I’m just starting to get to know Elixir. What would you learn f...
New
johnkirkham
A note on form. Joe Armstrong, co-creator of the Erlang programming language, died in April 2019. What follows is a work of narrative non...
New
gtcode
I’ve been tinkering with Lynx (by José) via hold_ledger. I used AI to write the code, a separate specification, the tests, and the Lean p...
New

Other Trending Topics Top

dominicletz
Hey there, I haven’t seen a list of useful Elixir specific skills for the popular AI tools yet so I’m starting one here with my first. ...
New
mudasobwa
I fully migrated to my own harness from Anthropic/Gemini and I think it’s time to share it. Welcome DSH, the DeepSeek Harness, fully writ...
New
KristerV
Hey. Is there anyone here who creates agents in their apps? Not talking about using agents, but creating them. I’m finding it pretty diff...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
webofbits
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself. My main conc...
#ai
New
OndrejValenta
(I just needed to vent somewhere and LinkedIn is full of hope, or hype, I’m not sure which exactly) AI dream has many faces, but general...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews