SPDY in Phoenix
Asked Answered
C

2

9

I know that Cowboy is capable of handling SPDY protocol (not HTTP2, though). However, looking into Phoenix framework source code, I only see http and https calls. Is SPDY ignored? It's pity to have my Elixir/Phoenix site serves pages slower than its old Rails incarnation just because Apache/Passenger used SPDY and Phoenix doesn't.

The only reference to SPDY in the codebase seems to be https://github.com/phoenixframework/phoenix/blob/5fc7eb829338dca3efd4a4d8f79f9e928d1bc34c/test/phoenix/socket_test.exs

Should I try to fork Phoenix and see how to add proper Cowboy call myself or am I missing something obvious?

Covariance answered 26/1, 2016 at 14:10 Comment(2)
It might be worth asking this question in the phoenix-talk google group: groups.google.com/forum/#!forum/phoenix-talkKarlotte
or the #elixir-lang channel on freenodePraiseworthy
K
1

Old topic, but Cowboy 2.0 supports HTTP/2

And here some early attempts for The Cowboy 2 adapter for Phoenix

https://github.com/VoiceLayer/phoenix_cowboy2

and example app with http/2 support

https://github.com/voicelayer/phoenix_cowboy2_example

Kiss answered 27/10, 2017 at 23:4 Comment(0)
B
0

SPDY support has been removed from Cowboy2, and you should target HTTP/2 in the future if you aren't using a cdn.

Basically you'll need to use the latest PLug and Cowboy versions.

Here's a blog post about it https://chase.pursu.es/http-2-today-with-phoenix.html and another example app that leverages Webpack https://github.com/Ch4s3/http_2_today.

Barboza answered 30/1, 2018 at 15:17 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.