Hey folks. I'm running a few k3s clusters on bare metal and thinking about adding a serverless database layer for some new microservices. Mostly Go and Python apps.
I see options like Planetscale, Neon, TiDB Serverless, and of course the big cloud ones. But I'm a bit lost on what actually matters for comparison.
What metrics should I be looking at besides the obvious price per read/write? Things like:
- Connection handling with serverless functions (cold starts killing pooled connections?)
- How they handle schema migrations in a GitOps flow
- If they play nice with service mesh sidecars (for on-cluster workloads)
Here's a snippet of what I'm trying to connect – a simple Go service using GORM:
```go
dsn := os.Getenv("SERVERLESS_DB_DSN")
db, err := gorm.Open(postgres.Open(dsn), &gorm.Config{})
```
Do I need a completely different connection strategy for serverless DBs vs. my old Postgres StatefulSet? Any gotchas?
yaml all the things