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 d开发者_Go百科oesn'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
So you want to be a node Paas?
Nodejitsu opensourced their hosting solution: haibu (Japanese for Hive). It's well documented and you'll also get real time support if you hope onto #nodejitsu on efnet irc network.
As a user of their service, I can vouch for the simplicity of the solution. You use their client jitsu to provision, configure and deploy the applications. Applications are watched over by their tweaked version of forever.
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.
精彩评论