@nikitabase
Nikita Shamgunov
4 months
The economics of running database as a service and offering a free tier are brutal. Each database instance burns at least a VM or a set of VMs  (for distributed or HA flavors) 👇
16
23
196

Replies

@nikitabase
Nikita Shamgunov
4 months
It's particularly painful if a free tier user spins up a database and then walks away - and the DbaaS provider is left with a bill that you can't pass onto AWS.
1
1
15
@nikitabase
Nikita Shamgunov
4 months
This is why many providers have started suspending free tier infra after X days idle. But even letting idle instances run for 24hrs can run up huge bills at free tier scale.
1
1
16
@nikitabase
Nikita Shamgunov
4 months
In addition to all this the word gets out that a particular DbaaS prodiver gives you free high quality of service databases and more and more people show up and not pay
1
1
11
@nikitabase
Nikita Shamgunov
4 months
Here are some common ways providers try and reduce the burn:
1
1
8
@nikitabase
Nikita Shamgunov
4 months
- Put up a Credit Card wall - limit who can access the free tier. You free service is not really free.
2
1
12
@nikitabase
Nikita Shamgunov
4 months
- Overcommit VMs. At least one provider is doing that and as a result you get slow and unpredictable performance on the free tier.
1
1
9
@nikitabase
Nikita Shamgunov
4 months
- Spin up databases quickly to avoid users going away while you spinning them up. Then you are left with the bill
1
1
8
@nikitabase
Nikita Shamgunov
4 months
- Be very aggressive turning databases off. 7 days might be too expensive
1
1
9
@nikitabase
Nikita Shamgunov
4 months
And there is also a better way. @neondatabase serverless:
1
1
9
@nikitabase
Nikita Shamgunov
4 months
- Databases instances shut down in 5 min and spin back up on demand in 200-300ms. This is *mostly* invisible to the users and database is just a URL
1
1
23
@nikitabase
Nikita Shamgunov
4 months
- Delivering on this requires separating storage and compute and keeping a warm pool of VMs around
1
0
10
@nikitabase
Nikita Shamgunov
4 months
- You can further optimize storage by making it multitenant and integrated into S3
1
0
7
@nikitabase
Nikita Shamgunov
4 months
-Unused data flows to the cheapest storage medium
1
0
9
@nikitabase
Nikita Shamgunov
4 months
- Never use EBS. Local SSDs and S3 are the only storage primitives allowed
1
0
22
@nikitabase
Nikita Shamgunov
4 months
- Even with ALL that @neondatabase feels free tier is too expensive and we will go on another COGs reduction journey. Next set of ideas are denser packing of VMs and ARM CPUs
8
0
28
@marsupialtail_2
Tony Wang 🐨
4 months
@nikitabase I have a very stupid question. Why can't you just multitenant free tier people, give them no performance or isolation SLAs, and just allow them to familiarize with interface?
2
0
7
@nikitabase
Nikita Shamgunov
4 months
@marsupialtail_2 A big step is to allow people run a small app 24/7
0
0
3
@srnlrsn
Soren Larson
4 months
@nikitabase Great thread / thanks for sharing this!!
0
0
0
@adatta02
Ashish Datta
4 months
@nikitabase @andyhattemer Maybe the lesson here is "database as a service" shouldn't have a free tier?
2
0
2
@fire_809
Mohamed
4 months
1
0
0