Cloud Architecture·8 min read·

Cost-Aware Architecture on INR Pay-as-You-Go

Treat each VPS as a line item in INR: right-size roles, delay splits until SLOs demand them, and turn idle nodes off instead of overbuying reserved capacity.

NB

Netbay Developer Relations

Netbay Engineering

On this page

Pay-as-you-go in INR makes architecture visible on a bank statement. Every extra VPS is a daily charge. Every oversized plan is a donation to idle Intel Xeon Platinum cycles. Cost-aware architecture is not cheapness. It is putting rupees on the roles that protect an SLO and refusing to fund diagrams that do not. In one Lucknow datacenter, you cannot hide spend behind a global discount programme. You can see it.

Price the Role, Not the Dream Topology

A reasonable first production shape is four nodes: edge, api, data (Postgres plus Redis if memory allows), worker. That is already four invoices. A service mesh, a tracing cluster, and a staging clone of everything is twelve. Staging can be one VPS that runs the stack under docker compose or even sequential systemd units. Production isolation is for blast radius. Staging isolation is for confidence. They are not the same budget.

Write the monthly INR next to each role. If you cannot name the SLO a node protects, it is a candidate to merge or to power off. A metrics box that nobody queries is a hobby. A replica that is 12 hours behind because nobody watches lag is not DR; it is a second copy of risk with a bill.

bash
# Inventory: what you pay for, what it does, last SLO it moved
# role          plan        approx INR/mo    SLO
# edge          small       R                TLS + 429
# api           medium      R                checkout p95
# data          medium+     R                RPO / lock time
# worker        small       R                invoice age
# staging       small       R                none overnight
# metrics       small       R                only if queried

# Power off staging at night if nobody deploys
systemctl is-active app-api

The Netbay API can purchase and power-manage instances. Use that for staging and load-test boxes that should not exist at 03:00. Production data nodes stay up. The distinction is the architecture.

Split When Contention Is Real

The expensive mistake is splitting too early: three tiny VPS nodes that each waste RAM on a second kernel, a second sshd, a second journald. The other expensive mistake is splitting too late: one node where Postgres checkpoints, Redis forks, and PDF renders collide, so you buy a huge plan to hide a design problem. Contention shows up as SLO burn and iowait, not as a feeling that "microservices would be cleaner".

When you do split, split the hot resource. CPU-bound workers leave the data node. Memory-bound Redis leaves the API. Disk-bound Postgres gets its own High-Speed SSD and the plan that actually has disk. Do not upgrade every node because one role is hot. Pay-as-you-go means you can size one role on Monday and leave the others alone.

python
# Sketch: stop paying for staging while the team is offline
import os, urllib.request, json

BASE = 'https://api.netbayhosts.in'
KEY = os.environ['NETBAY_API_KEY']
SECRET = os.environ['NETBAY_API_SECRET']

def power(service_id, action):
    req = urllib.request.Request(
        BASE + '/api/v1/services/' + service_id + '/' + action,
        method='POST',
        headers={'X-API-Key': KEY, 'X-API-Secret': SECRET},
    )
    with urllib.request.urlopen(req) as resp:
        return resp.status

# crontab: 22:30 IST power off staging, 09:00 power on
# power('svc_staging', 'stop')

Confirm the exact power endpoints in the current API docs before you put them in cron. The point is the policy: non-production compute should follow the team's calendar. Production compute follows the SLO.

Spend follows SLO, not diagram gravity Merge no contention yet Right-size hot role only Split SLO is burning Off idle staging INR line items in Lucknow DC01 edge + api + data + worker is a fleet twelve copies of staging is a hobby

What You Should Not Cheap Out On

Backups, the replica that actually applies WAL, and the edge timeout budget are cheap compared with a restore you cannot finish. L3/L4 DDoS filtering is part of the platform; do not disable a firewall to save a lookup. Snapshots before a migration are cheaper than an afternoon of archaeology. High-Speed SSD on the database node is cheaper than a bigger API plan that still waits on fsync.

Do not build a private object-storage product on leftover disks and call it free. Do not rent a managed Kubernetes control plane you will not staff. Isolation remains extra VPS nodes when a tenant's blast radius is worth more than the invoice, and a shared node when it is not. That comparison is the job. Write it down in INR.

Watch the bill weekly the same way you watch queue age. A node that survived a load test and was never deleted is the usual leak. A log volume that grew because journald was unlimited is a disk plan you did not mean to buy. Cost is an operational signal. Treat it like one.

Takeaway

Cost-aware architecture funds the roles that hold SLOs and RPO, sizes the hot resource, and turns the rest off. Pay-as-you-go INR billing is a feature: it makes idle topology obvious. Use it. Lucknow is one site; you will not save money by pretending there is a cheaper region.

Right-size a four-node fleet on Netbay in Lucknow (DC01) and power staging from the API when the team actually needs it — netbayhosts.in.

Keep reading

Follow along on a real VPS

Deploy Linux in under 60 seconds

These guides are written against Ubuntu, Debian, and RHEL-family images — the same ones on NetBay.

Deploy an instance