So I am an independent software developer and I'm building up my portfolio in the hopes of helping with job applications. I have a broad design for a web based "app" (not really like a phone app, more like a web platform) that in reality would only "scale" if it used microservices. (It's a recommendation-based content engine, for hosting and linking to content and then recommending more content to users who participate voluntarily). The thing is, I would like to be able to run a version of this on a public VM, which is a thing I can afford, as a demo, and to host it on Github so people can do the same; I cannot afford to take the risk of using microservices "in the wild" and getting overrun with costs at this stage. But I also know that if I write the program as a local program that just queries against databases and the like, it will be something no one could really put into practice in a serious environment these days.

I know there are emulators for most functions of the big clouds, but most of them have licensing and practical/security restrictions against using them outside of your personal development machine.

So: is there a way to write an application that you could deploy on a Linux VM by itself, but with minimal modifications could be made to scale in a modern cloud environment? Or am I just aiming too far? (I'm sorry if this is vague in terms of technologies: I don't have a cloud preference for the application, and I'm not sure that the language etc. is relevant to answering this question, but I'm happy to elaborate or edit.)

  • I don't think deploying into a VM would give you the benefits of using cloud-native infrastructure; indeed VMs are usually for the scenario that you seem to be trying to avoid (i.e. a program which wasn't designed with cloud in mind). However, realistically, the free tiers of both AWS and Azure (and probably other providers too) should be more than enough for a demo - e.g. you're unlikely to exceed the free limits for microservices hosted in an Azure Function or AWS Lambda. Similarly the free limits of DynamoDB or CosmosDB should be enough for a demo too. Feb 7, 2021 at 20:15
  • @BenCottrell: As I understand it, the goal of the VM-deployed instance is to not be cloud-dependent, even though the codebase itself would already be cloud-capable. The first part of your comment sort of misses the mark here. But I do agree that the free resources are worth checking out as it would definitely be the simplest solution.
    – Flater
    Feb 8, 2021 at 9:27

4 Answers 4


"Microservices" are a deployment pattern for a particular form of late binding: program A makes a request from program B internally over the network. Program A marshals a request object, sends it over the network, program B un-marshals it, creates the response, and sends it back again. You could .. just leave out the intermediate steps.

That is, rather than have a microservice call, have a normal function call and have the "service" run in the same execution environment. If the microservice's runtime state doesn't necessarily conflict with the caller's execution state, this ought to be fine.

If it needs to be asynchronous and be more service-flavoured, you can just have the top-level router in your application host (I'm assuming something like Node here?) serve both the microservice and the main application, and have the application make requests to the service. You'll have to put a little authentication here such as a shared secret and ban external IPs from the internal service.

However, computers are well over thousand times faster than when I first wrote a web application; you'd be surprised how well things can scale on a single large system.

Moreover, microservices are frequently adopted for the wrong reasons. You may not need one at all. In any case no application written by a single person for demo purposes is going to seamlessly scale horizontally without some rework. It's OK to have a demo that isn't the same as a shipping product.


There are 2 main options I am aware of;

  1. serverless
  2. Docker Compose

With serverless you will still likely need some kind of api/ui frontend. Docker Compose is probably the most complete and natural fit as they can be deployed as-is to many clouds, or upgraded easily to hosted K8s. Combining the 2 will give you the most complete solution.

The other recommendation I'd give is that working software that might not scale at some point is better than non-working software that might scale. Running at scale brings a whole host of other issues much more complex.


Yes, you can. Please have a look at Docker Compose. You can have a single docker-compose.yaml file describing all services you need for your micro services architecture, e.g. a database container, a backend container and a frontend container that can be locally deployed as easily as issuing the following command:

docker-compose up

Moving forward, each of these containers will be deployed on some production infrastructure, but that can be decided later without impacting your local development and deployment.


First, I suggest you use "Heroku" for deploying your microservices for demo purposes. But for the future, I think you need to learn how to dockerize your microservices, then you are able to easily deploy, scale, and manage the microservices everywhere. You can learn more here:

Dockerizing My First App

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.