views:

286

answers:

1

Hi,

I want to create something similar to Heroku (first I was thinking in EngineYard-like but I prefer Heroku) for node.js (I know they already support node.). However, It's for a personal project so it doesn't need to be anything overcomplicated or super expensive. I believe I can learn a lot creating a product like this.

Before I start, I have several doubts:

  • Heroku uses a reverse proxy to receive the requests. However, reverse proxy doesn't work fine with websockets. How can this be fixed?

  • 1 instance supports several dynos. How can an instance be divided by RAM, processing, etc?

  • I guess if I have an answer to the last questions I'll be able to create a route mesh. However, what can be the tricks here?

Regards. Donalds

A: 

Go for the simplest possible implementation.

  • Use HAProxy, Apache Traffic Server or mongrel2 as your reverse proxy. They all support the HTTP 1.1 protocol and should work with websockets.
  • Don't worry about limiting resources.
  • Also don't worry about a routing mesh. Just update and reload the config on your reverse proxy any time you're spinning up a backend process.

Good luck. Pimpin' ain't easy.

jkvor