
Cowboy 2.0 released - tiffanyh
https://ninenines.eu/articles/cowboy-2.0.0/
======
Cowicide
For those wondering what this is, I grabbed this from the zip file:

= Cowboy

Cowboy is a small, fast and modern HTTP server for Erlang/OTP.

== Goals

Cowboy aims to provide a _complete_ HTTP stack in a _small_ code base. It is
optimized for _low latency_ and _low memory usage_ , in part because it uses
_binary strings_.

Cowboy provides _routing_ capabilities, selectively dispatching requests to
handlers written in Erlang.

Because it uses Ranch for managing connections, Cowboy can easily be
_embedded_ in any other application.

Cowboy is _clean_ and _well tested_ Erlang code.

== Online documentation

* [https://ninenines.eu/docs/en/cowboy/2.0/guide[User](https://ninenines.eu/docs/en/cowboy/2.0/guide\[User) guide] * [https://ninenines.eu/docs/en/cowboy/2.0/manual[Function](https://ninenines.eu/docs/en/cowboy/2.0/manual\[Function) reference]

== Offline documentation

* While still online, run `make docs` * User guide available in `doc/` in PDF and HTML formats * Function reference man pages available in `doc/man3/` and `doc/man7/` * Run `make install-docs` to install man pages on your system * Full documentation in Asciidoc available in `doc/src/` * Examples available in `examples/`

== Getting help

* Official IRC Channel: #ninenines on irc.freenode.net * [https://github.com/ninenines/cowboy/issues[Issues](https://github.com/ninenines/cowboy/issues\[Issues) tracker] * [https://ninenines.eu/services[Commercial](https://ninenines.eu/services\[Commercial) Support]

~~~
thinkMOAR
"Cowboy is a small, fast and modern HTTP server for Erlang/OTP"

It could really use this line on the linked page for people (me) that never
heard of Cowboy in the first place. HTTP/2.0 gave me a clue, but plenty of
client software that has HTTP/2.0 support too.

~~~
Sean1708
To be fair if you go to the main website it does give you that information, I
feel like it would be redundant to put it on every single page.

------
matt4077
If anybody else is getting lost in the woods, hunting for change logs, this is
the best I found:
[https://ninenines.eu/docs/en/cowboy/2.0/guide/migrating_from...](https://ninenines.eu/docs/en/cowboy/2.0/guide/migrating_from_1.0/)

~~~
ryanswapp
Thanks! Was looking for that.

------
krapans
Good news. So it means HTTP/2 support is incomming for
[https://github.com/elixir-plug/plug](https://github.com/elixir-plug/plug) :)

~~~
davidkuhta
Yeah had the same thought, I was thinking "Cowboy, Cowboy, why does that sound
familiar..." Then the purple Elixir related light-bulb kicked on.

------
e12e
After reading about tls 1.2 sessions[s], I wanted to see how easy/hard it
would be to a) run tls 1.2 without session tickets, and/or force tls 1.3+ --
the closest I came was:

[ed: moved the link up, for less confusing flow]
[http://erlang.org/doc/apps/ssl/ssl_protocol.html#id61195](http://erlang.org/doc/apps/ssl/ssl_protocol.html#id61195)

which isn't all that enlightening to someone not familiar with Erlang. Does
anyone know of a "best security practices" particularly for cowboy/opp/erlang
and/or elixir?

I'm reminded of how for the longest time ssl was completely broken in python
(it wasn't at all obvious how to force verification of certificates -
especially for new developers)... And I've grudgingly come to accept that
tls/http2 is complex enough that beyond getting to "it works" \- even
foolproof libraries need a couple of lines of text discussing trade-offs (eg.
security vs performance vs ease-of multi-server deployment of session
resumption).

[s]
[https://news.ycombinator.com/item?id=15358446](https://news.ycombinator.com/item?id=15358446)

~~~
strmpnk
I found this link handy:
[https://gist.github.com/ferd/af9abf6b3600d2d7f08dba58fdfb514...](https://gist.github.com/ferd/af9abf6b3600d2d7f08dba58fdfb514a)

There's certainly a lot of room for improved documentation in this area. I'd
even buy a book on this topic.

------
ewalk153
I assume that this is the same cowboy server that provides the Heroku routing
layer. Does this mean anything for our Heroku apps?

~~~
strmpnk
As far as I've seen, it used to be a heavily modified version of cowboy v1
[1]. I'm not sure what they're using now.

[1]: [https://github.com/heroku/cowboyku](https://github.com/heroku/cowboyku)

~~~
tehno
HTTP headers still say "Server: Cowboy" and "Via: 1.1 vegur", so
vegur+cowboyku+custom code.

------
atonse
This is great news. Congrats to the Cowboy devs!

Do a lot of people that run Phoenix apps in production expose cowboy directly
to the public?

I'm always putting them either behind nginx or Amazon ALB, both of which
support http/2.

------
sitkack
Time to Erlang Again!

~~~
BLanen
Or Elixir

~~~
hajile
I must be a rarity because I prefer the Erlang syntax over Elixir.

~~~
kureikain
I always feel I'm alone in this world. Erlang syntax is short and way easier
to read compare to Elixir(due to its close to Ruby).

------
chaz6
Are there any release notes? There does not seem to be any on the GitHub page.

------
Cieplak
If you're interested in working with cowboy, we use it extensively at Finix,
directly from Erlang as well as through Phoenix from Elixir. My email is
cGF0cmljaytobkBmaW5peHBheW1lbnRzLmNvbQ==

~~~
aanari
Awesome Cieplak, best of luck to you and the team @ Finix!

~~~
Cieplak
Thanks Ali! Miss working with you dude

------
darklrd
This is awesome! Can't wait to use websocket compression.

------
jamespo
Can this be used to proxy requests from a downstream server, ie reverse
cowboy?

------
desireco42
FYI :) since it is not obvious, this is Elixir server that is used for Phoenix
among other things. So, big news. I didn't follow it much but it seems they
support http/2 etc.

~~~
strmpnk
Small detail but it's an Erlang/OTP application which supports building HTTP,
HTTP/2, and web socket services on top of Ranch (a TCP connection management
library by the same author). Ranch makes it easy to manage TLS setup as well
as connection pool tuning to fit your load profile, keeping latency reliable
and low.

Since it's built as an OTP application, it's pretty easy to drop this into any
release, including something built using Elixir (commonly via Plug), LFE,
Alpaca, and/or plain Erlang.

------
willyk
whohoo! thanks for all your hard work on this!

------
noncoml
Worth mentioning that Cowboy is pretty much a one man show: Loïc Hoguin

~~~
vanderZwan
This always fills me with awe and dread at the same time (technically speaking
the "awe" should cover the "dread" part but nobody uses it that way these
days).

I'm in awe at the achievement, and combination of vision, drive, knowledge,
and skills that the maintainer must possess (or even more inspiring: has built
up along the way).

I dread the bus factor[0], or the more common weaker form of _" maintainer is
forced to move on from this project or just loses interest before someone else
takes over and is worked in, and a lot of necessary tacit knowledge[1] is lost
in the hand-over"_.

EDIT: Actually, I'm one to talk, working as the sole programmer at a research
group... Given the required optimizations for its niche my code gets pretty
hairy. I should plan a few weeks of pure cleanup and extra commenting, and
general documentation.

[0]
[https://en.wikipedia.org/wiki/Bus_factor](https://en.wikipedia.org/wiki/Bus_factor)

[1]
[https://en.wikipedia.org/wiki/Tacit_knowledge](https://en.wikipedia.org/wiki/Tacit_knowledge)

------
nailer
The announcement, including highlights:

[https://ninenines.eu/articles/cowboy-2.0.0/](https://ninenines.eu/articles/cowboy-2.0.0/)

Full changes:
[https://ninenines.eu/docs/en/cowboy/2.0/guide/migrating_from...](https://ninenines.eu/docs/en/cowboy/2.0/guide/migrating_from_1.0/)

By the power of grayskull I invoke dang to update the link.

