The Changelog

spacer

Open Source moves fast. Keep up.

Nginx gains support for WebSockets

I saw this commit land a few days ago, and now it’s out in a release. nginx 1.3.13 has support for proxying WebSockets requests.

What does that mean? Well, let’s look at the commit that introduced the change:

This allows to proxy WebSockets? by using configuration like this:

location /chat/ {

    proxy_pass ​backend;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";

}

A nice example, right there! Before you could do this, you needed to do some kind of extra tricks, like using varnish in front of nginx and having varnish proxy the requests straight to your back end servers. Super awkward.

You can grab a copy of nginx 1.3.13 on their download page.

Discuss on Hacker News.


Have comments? Send a tweet to @TheChangelog on Twitter.

Subscribe to The Changelog Weekly – our weekly email covering everything that hits our open source radar.

Linked by Steve Klabnik on Feb 19, 2013

Links HTML5 nginx websockets

Changelog Ads spacer

Continuous Deployment made simple. Codeship runs your tests & continuously deploys your code. Try it now for free!

gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.