I tried setting up Cloud Foundry this week using Micro Cloud Foundry. See my post on ql.on Cloud Foundry for details. The setup and experience is not that hard – it took two late nights to figure out the details. But I’m not sure if it is ready for the prime time. Here are my observations.
- Cloud Foundry has the notion of multiple apps on a given VM, but is this the right model? I would let the VM worry about isolating CPU, memory and the disk so that apps remain independent of one another and tuning can be done be independently. The multi-app model may be okay for several small apps running on a single VM, but not otherwise.
- Cloud Foundry uses an L7 router (ngnix) between clients and apps. The router needs to parse HTTP before it can route requests to apps. This approach does not work for non-HTTP protocols like WebSockets. Folks running node.js are going to run into this issue but there are no easy fixes in the current architecture of Cloud Foundry.
- As of now, I can’t get chunked responses work on node.js apps deployed on Cloud Foundry VM. See https://gist.github.com/2164855 for an example.
- In the real world, I need to explicitly control routing and load balancing at a tier in front of my apps. But Cloud Foundry adds one more unnecessary routing tier on each VM.
- There is no support for rolling upgrades. May be there are ways to enable this, but it is not clear from the documentation. So availability becomes a manual exercise.
- The story about logging, monitoring and metrics is vague. I see some references to third-party plug ins for certain kinds of apps, but support seems to be missing in the PaaS layer.
If you find that my understanding is incorrect, please help clarify and set us in the right direction. My interest is in getting node.js stack run well on Cloud Foundry.
Update: A work-around for the chunked encoding issue is to always add the Content-Length to responses.