Responsive Deployment

Deploying web applications can be done on numerous hardwares: virtual private server, dedicated server, mega big cluster, raspberry pi… On every single of them applications are deployed the same way and offer the same capabilities. Though, they could adapt to the hardware on which they are deployed. They could do less and perform better on small micro-boards like the Raspberry Pi and they could propose more features on a Octo-Core Xeon server.

The same way we have a responsive design for different sizes of screen we could imagine a responsive deployment that would deliver more or less modules depending on the hardware. With the rising of configuration management tools, we will probably see recipes/states/playbooks including several behaviors depending on the underlying architecture.

The hardware chosen by the user shapes the usage of the app. For instance a calendar app deployed on a Raspberry Pi would probably be aimed to be used by one or two people at most. The same app deployed on a big server will probably meant to be used in a collaborative way by a large group.

Let’s see two exemples as an illustraton:

  1. Ghost blogging platform supports both sqlite and mysql as a backend database. So, a responsive deployment approach would lead to two options:
  • On a ARM hardware (RPi, Cubieboard, etc.) or on a small VPS it would deploy Ghost with SQlite as a backend database. We could expect less CPU and memory consumption.
  • On a dedicated web server based on a x86 processor it would deploy Ghost with a MySQL database. Resource consumption is higher but more connections can be handled.
  1. Let’s imagine a Node.js app with an indexing feature
  • On a ARM hardware or on a small VPS it would use a bundled indexation library (say search-index):
  • On a x86 hardware it would deploy it with an external indexer based on Whoosh library. Whoosh would allow to use more indexation features.
  • On a big Xeon server it would deploy it with Elastic Search as an external indexer. Elastic Search would provide high scalability capabilities.

As you see, smarter deployment could make web applications more efficient and more adapted to their user needs. What about you? What do you think about it? Feel free to give your thoughts about it in the comments!

icons from iconmonstr.com