r/devops • • Oct 12 '26

Observability Building a taxi app with a microservices architecture. How would you deploy it on a small budget?

Hey everyone! I'm building a taxi booking platform, and I'm trying to figure out the smartest way to deploy it without spending too much money before launch.

I'm building the backend first, using Python, FastAPI, PostgreSQL, Redis/Valkey, Kafka, and Docker. The architecture is split into services for identity and authentication, passengers, drivers, rides, location tracking, driver-to-ride matching, passenger-to-passenger matching for shared rides, payments, notifications, and admin operations. I'm also using Nginx as an API gateway.

One of the more interesting parts of the project is the shared-ride system. I want passengers travelling in similar directions to be able to share a taxi, with route compatibility, pickup and drop-off ordering, seat capacity, pricing benefits, and time limits all taken into account. I'm planning to use H3 spatial indexing together with Redis to make nearby passenger discovery faster, while PostgreSQL remains the source of truth. Redis is used for fast lookups and caching, not as the authority for important business decisions.

I'm also building an operations dashboard for managing drivers, document approvals, roles and permissions, and monitoring the platform. Payments will initially support cash, with card payments planned through a proper provider. The passenger and driver mobile apps will come later, after I have a better understanding of the backend's production readiness.

My main challenge now is infrastructure. I don't want to pay for an expensive Kubernetes cluster or a huge cloud setup when I'm still preparing for launch. At the same time, I don't want to take shortcuts that will cause serious problems when real drivers and passengers start using the app.

For those of you who have deployed similar systems, especially on a tight budget:

  • Would you deploy the services on one VPS using Docker Compose at first, or split them across multiple VPS instances?
  • How would you handle PostgreSQL, Kafka, Redis/Valkey, backups, monitoring, and logs without making the monthly bill explode?
  • Would you keep Kafka from day one, or simplify the deployment until traffic justifies the extra infrastructure?
  • What would you use for production deployment, CI/CD, secrets management, HTTPS, database migrations, and recovery if the server goes down?
  • Which affordable hosting providers would you recommend, and what should I consider when choosing one?

I'm not looking for the most sophisticated infrastructure possible. I want a realistic deployment strategy that keeps costs low, protects customer data, and gives me a clear path to scale when the business starts growing.

I'd really appreciate advice from people who have actually deployed and operated production systems on a tight budget. If you were starting this project today, what would you do differently?

15 Upvotes

36 comments sorted by

13

u/HardestDrive Oct 12 '26

Eghhhh. Its a tough one, especially in the current day and age of security. The main thing is attack surface, if your one virtual IP or VM backs the database, the API endpoints and the backend, you're not in a good position. I won't go in to detail about an architecture, but please keep security number one on your list.

0

u/Actual_Way5611 Oct 12 '26

That's a fair point, and security is definitely something I don't want to compromise on just to save money. I'm trying to find the right balance between a low-cost initial deployment and proper isolation.

My backend is already split into separate services, with PostgreSQL as the source of truth, Redis/Valkey for caching and spatial lookups, and Kafka for asynchronous communication. But I understand that separating services logically doesn't automatically mean they're isolated securely at the infrastructure level.

For someone starting with a limited budget, what would you consider the minimum acceptable setup? For example, would you start with a single VPS for the application services and a separate managed or isolated database, with private networking, strict firewall rules, and off-site backups? Or would you approach it differently?

I'm particularly interested in the security measures that are worth investing in from day one, rather than adding them after a problem occurs.

12

u/RedanfullKappa Oct 12 '26 edited Oct 12 '26

Its not what you asked for, but if this is an actual real project.
Don’t do microservices if you don’t really need them bundle as much as possible into one monolith.
Scrap Kafka if you don’t really need it.

And just deploy it as container or fargate or smth.

Edit: I do consult on performance tuning for these kinds of architectures. 99.9% of my customers would have been better off doing monoliths and they are doing gigantic rewrites of their architecture because their getting fed by the negatives no one thought about. Because they built a distributed monolith

0

u/Actual_Way5611 Oct 12 '26

I probably got a bit carried away with separating everything into services while designing the backend. The project has some complex parts, especially shared-ride matching and location tracking, but I agree that I shouldn't add infrastructure complexity without a real reason. I'm considering whether to consolidate some services while keeping the business logic clearly separated. For Kafka, would you remove it completely at the beginning, or keep it only for the workflows where asynchronous communication and event delivery actually matter?

3

u/RedanfullKappa Oct 12 '26

I can’t tell you that without knowing how you use kafka. I usually only recommend adding it if you need it. A super basic setup is at bare minimum 6 nodes and quite expensive.

For services you only split off what needs to be split off. Just don’t create a distributed monolith but for actual consulting I’d need more resources and time

1

u/Actual_Way5611 Oct 12 '26

I probably need to evaluate Kafka based on what the system actually needs rather than just keeping it because it's part of the architecture

The reason I introduced it was to handle asynchronous communication between services, especially around ride lifecycle events, driver matching, notifications, and real-time updates. But I'm still preparing for the first production launch, so I don't want the infrastructure costs and operational complexity to get out of hand before I have real traffic

I'll take another look at which workflows genuinely benefit from Kafka and which could use something simpler. I also agree about service boundaries. I want to separate domains where there's a real reason, not end up maintaining a distributed monolith

3

u/RedanfullKappa Oct 12 '26

Kafka if you have never used in prod is an operational nightmare and a lot of complexity. From the 100s of clients I had maybe 10 actually needed Kafka 80 were using it and spending so much money

2

u/Paddington_the_Bear Oct 13 '26

You can literally use PostgreSQL for your async communication needs. Especially since you're just launching, consolidate as much as possible and keep it simple, reduce your tech stack. You only start reaching for niche tooling when the scale of your problems reaches that level.

11

u/chat-lu Oct 12 '26

Every microservice architecture that works was broken out of a monolith that worked.

1

u/Actual_Way5611 Oct 12 '26

That's a good point. Looking back, I can see how starting with a monolith could have made things simpler in the beginning. I've already built the backend around separate services, though, so now I'm trying to find the most practical way to deploy what I have without making the infrastructure too expensive or complicated. I'm curious, do you think it's worth consolidating some services at this stage, or would you keep the existing architecture and focus on simplifying the deployment?

7

u/chat-lu Oct 12 '26

It's usually a bad idea performance-wise to replace a function boundary with a network one.

Microservices usually solve an organizational problem, not a technical one. Which means completely distinct teams working on each part.

When you don't have this problem, inertia tends to push you towards what we call a distributed monolith. Which means microservices that are very interdependent that you have to upgrade at the same time.

So yes, I would definitely advise on simplifying the infrastructure, it will simplify the deployment too.

1

u/Actual_Way5611 Oct 12 '26

To clarify, I'm not committed to running every microservice on a separate server. My priority is to keep the backend maintainable and the deployment affordable while leaving room to grow.

I've already separated the main business domains, such as identity, rides, driver matching, passenger-to-passenger matching, location, payments, and notifications. Ideally, I'd like to preserve those boundaries where they make sense, but I'm open to deploying multiple services together or even consolidating some of them if that makes the system simpler and more reliable.

What I'm trying to figure out is whether I should keep the current service architecture and simplify the infrastructure, or move towards a modular monolith with clearly separated business modules and extract services only when there's a real need. I'm especially interested in what makes the most sense for a solo developer preparing for a first production launch.

1

u/amarao_san Oct 13 '26

Nope. I have a show case, where different teams collaborated, but used different stacks. The split was natural, separation of concerns was natural and the contract was simple, but very enforced. It worked like a charm. Down to the micro service which wrote a local config from a database to a filesystem for other micro service to work without a database available.

If you have a need to use contracts, it will happen naturally

3

u/Fercii_RP Oct 12 '26

Maybe start with a modulith first, when necessary you can always make a microservices out of a module for scaling purpose

0

u/Actual_Way5611 Oct 12 '26

I agree that a modulith can be a better starting point, but there are a few constraints in my case. I've already built the backend around separate business domains, including identity, ride lifecycle, driver-to-ride matching, passenger-to-passenger shared-ride matching, location tracking, payments, notifications, and admin operations

The matching and shared-ride parts have quite complex business rules, and I want to keep those boundaries clear so they don't become tightly coupled. PostgreSQL is the source of truth, Redis/Valkey handles caching and spatial lookups, and I currently use Kafka for asynchronous communication between services

My main goal now is to get to production without expensive infrastructure or unnecessary operational complexity. I'm open to consolidating services or deploying several together, but I don't want to compromise transactional consistency, reliable event delivery, or the ability to scale demanding components independently later

Given those constraints, would you recommend moving towards a modular monolith, keeping the current services but simplifying their deployment, or taking a hybrid approach? I'd especially like to understand which boundaries you'd keep separate and which you'd consolidate first

2

u/singh_abinashi Oct 12 '26

Don't run microservices on one VPS with Compose and call it done without a plan for the stateful parts. Postgres and Kafka are what will hurt you, not the app containers. Use managed Postgres (backups included), and either managed Kafka or something lighter until you have real throughput. One deploy rule: the same image everywhere, config via env vars, migrations as a separate step before the rollout. Compose is fine for a side project. Budget the stateful stuff first.

1

u/Actual_Way5611 Oct 12 '26

I was mainly thinking about how cheaply I could run all the containers, but you're right that the databases and messaging infrastructure need more attention than the app containers themselves. Managed PostgreSQL sounds worth considering, although I'm trying to understand the cost trade-offs at a small scale. For Kafka, I'm also open to starting with something lighter if the workload doesn't justify it yet. If you were launching with a limited budget, would you prioritize managed PostgreSQL first and run Redis plus the application services yourself, or would you make a different trade-off?

2

u/singh_abinashi Oct 13 '26

Managed Postgres first, run Redis yourself. Postgres holds your rides, payments, and matching history, which is the data you can't rebuild, and managed backups mean a disk failure doesn't end you. Redis holds geo indexes and session data you can rebuild from Postgres, so self-hosting it on your own VPS is a fine trade while the budget is tight. The one thing I wouldn't skip either way: automated Postgres backups with tested restores before you have real users.

1

u/nick-sta Oct 13 '26

Have you considered https://ployz.dev or https://uncloud.run? They’re a part of a new wave of orchestrators that sit between docker compose and kubernetes. Very cost effective and scale to a decent size (20ish machines no problem).

1

u/iamichi Oct 12 '26 edited Oct 12 '26

I used Azure Startup Credits. Got $5000 off the bat and 6 months to use, then they bumped it $25,000 and gave a year to use because I had deplored I think 5 workloads in that time. Which consists of azure redis cache, pgsql flexi server, app service to start then privately networked AKS, signalR service, storage accounts (backups, blob storage for app, Terragrunt/terraform state files), VMs with cloudflared (for Cloudflare Tunnel ingress and CF One / Zero Trust for private vnet access) and application insights.
AWS has similar, pretty easy to get also.

If I hadn’t got that, I think I’d have used a hosted pgsql database (like Neon, Aiven or Supabase) and got 2-3 servers from hetzner for the application/CI compute and run k8s, probably Talos. And probably Sentry for monitoring.

Oh, and I highly recommend workos.com for auth. Very generous free tier, best auth experience I’ve used, and even provides MCP auth now, so you can set it up so people can book their taxis and get stays with their agent of choice

1

u/Actual_Way5611 Oct 12 '26

The combination of managed PostgreSQL, Redis, private networking, and monitoring sounds interesting. I'm still trying to keep my initial costs as low as possible, so getting credits like that could make a big difference. Did you apply through Microsoft's startup program, and did you need to have a registered company or an accelerator affiliation to qualify?

1

u/iamichi Oct 12 '26

Yeah, I used the startup program, had to register with LinkedIn 😒 but worth it, got a years free hosting. No accelerator was needed, application to get $5k took about 30 mins and had it a few days later. Did need a company yes. But assume you’ll have one for your app to run under anyway

1

u/iamichi Oct 12 '26

And if you do use Azure, I’d try to keep to open souce standards, so AKS and not Azure Container Apps, and external tools like Cloudflare for ingress and DNS. That way if you need to move off, you can do so much easier as your helm charts will work with k8s somewhere else and with Cloudflare Tunnel, moving hosting is a lot more straightforward

2

u/SeaworthinessHour233 DevOps Engineer & Educator Oct 13 '26 edited Oct 13 '26

This is what I would do:

- 2 x EC2 instances with Graviton CPUs (t4G small or Medium depending on memory requirement). 1 year savings plan
- First EC2 for front-end (Nginx proxy + Python app) on Docker Compose
- Second EC2 for backend/databases on Docker compose
- No public IPv4
- AWS CloudFront directly routing HTTP to first EC2
- S3 for any static files

Start with IaC (OpenTofu) from day-1. You can easily add managed databases and redundancy later.

1

u/6razyboy Oct 31 '26

I would probably just go with Docker Compose for now. With that many services Kubernetes seems like overkill tbh.

But before that I would try to get a clear picture of how all those services connects to each other, which ones actually need to be separate and so on.

Btw I am building an open source tool called Compoviz (https://compoviz.pro), basically it visualizes docker compose files and you can also build stuff with drag and drop. Might be useful for your case, idk, just sharing 😉

1

u/ResolveResident118 Jack Of All Trades Oct 13 '26

"when real drivers and passengers start using the app"

Start worrying when this actually happens, not before.

1

u/Cubepath Oct 13 '26

I'd start with a single VPS and Docker Compose to keep costs low before launch. Just make sure you have backups and monitoring in place.

If you're comparing hosting providers, you could also check out CubePath. We offer affordable VPS options that might fit your project.

1

u/kevinhuse Oct 13 '26 edited Oct 13 '26

Start with Docker Compose on one VPS and keep the setup simple. Unless Kafka is essential from day one, a lighter queue can reduce costs and maintenance. Prioritize automated backups, monitoring and tested recovery before scaling.

1

u/Right_Cartoonist2691 Oct 16 '26

For a small-budget taxi app, introducing a long list of micro services before validating demand could create more work than value. Every extra component adds deployment, monitoring, and debugging overhead, which is a real burden when time and money are limited. A simpler foundation is easier to maintain, and as the product grows, infrastructure planning of the kind discussed across the industry, including by trusted tech, becomes more relevant when there is a clear need to scale.e

1

u/LumenStack_DevOps Oct 17 '26

If you want to keep initial costs essentially at zero, look into AWS Activate Founders. You can usually get $1k–$5k in free cloud credits just by having a working website and a business domain. That'll easily cover your early staging, Postgres, and Redis bills while you scale up the MVP.

1

u/josejulianariza Oct 21 '26

Si estuviera arrancando ese proyecto hoy, iría por bastante menos. Con ese presupuesto, un solo VPS con Docker Compose y Nginx adelante alcanza para lanzar. Kafka lo dejaría para después: con colas sobre Redis o las de PostgreSQL ya alcanza al principio. CI/CD y secretos sí conviene resolverlos desde el día uno, aunque sea básico, porque eso es lo que más duele cambiar después.

Lo que más te pudiera salvar es que PostgreSQL sea la única fuente de verdad y que los backups vivan fuera del VPS. Con eso, si el servidor se cae, lo reconstruís. Lo que evitaría es sumar componentes que después no vas a poder mantener solo, porque cada cosa que agregas hoy la vas a tener que operar cuando ya tengas usuarios encima.

1

u/[deleted] Oct 12 '26

[removed] — view removed comment

1

u/Actual_Way5611 Oct 12 '26

Starting with a small VPS and scaling up when needed is pretty much the approach I'm considering. I'll check out litepod.sh. My main concern is running all the services, PostgreSQL, Redis, and Kafka without running into resource or security problems. Have you actually used this setup in production? I'd be interested to hear how well it works in practice and which hosting providers you'd recommend.

1

u/Extension-String1599 Oct 12 '26 edited Oct 12 '26

yes, I have sql seerver running on a little vps and also a bigger vps just to have my cloud server backup and tools for dev . But please make sure to have a vps with a provider that allows you to grow in the future because if you start getting users then this can be hard to scale

EDIT: You can use this litepod as control panel and to connect multiples server through SSH and to use the main as control panel and the other ones to manage resources when you grow. (and yes this is an application i have written, and I use it for more than a year, also you can use Dokploy or Coolify but they take like 1.5GB of RAM in idle)