Live data from Hacker News

Almost every infrastructure decision I endorse or regret

cep.dev

71–80 of 644 posts

Re: Almost every infrastructure decision I endorse or regret

#71

If you are startup that can can’t afford a DBA, then why why why are you using Kubernetes?

Why wouldn't you use Kubernetes? There are basically 3 classes of deployments:

1) We don't have any software, so we don't have a prod environment.

2) We have 1 team that makes 1 thing, so we just launch it out of systemd.

3) We have between 2 and 1000 teams that make things and want to self-manage when stuff gets rolled out.

Kubernetes is case 3. Like it or not, teams that don't coordinate with each other is how startups scale, just like big companies. You will never find a director of engineering that says "nah, let's just have one giant team and one giant codebase".

Re: Almost every infrastructure decision I endorse or regret

#72

The kitchen sink database used by everybody is such a common problem, yet it is repeated over and over again. If you grow it becomes significant tech debt and a performance bottleneck. Fortunately, with managed DBs like RDS it is really easy to run individual DB clusters per major app.

Lots of interesting comments on this one. Anyone have any good resources for learning how not to fuck up schema/db design for those of us who will probably never have a DBA on the team?

Good question. We don't have a DBA either. I've learned SQL as needed and while I'm not terrible, it's still daunting when making the schema for a new module that might require 10-20 tables or more.

One thing that has worked well for us is to alway include the top-most parent key in all child tables down yhe hierarchy. This way we can load all the data for say an order without joins/exists.

Oh and never use natural keys. Each time I thought finally I had a good use-case, it has bitten me in some way.

Apart from that we just try to think about the required data access and the queries needed. Main thing is that all queries should go against indexes in our case, so we make sure the schema supports that easily. Requires some educated guesses at times but mostly it's predictable IME.

Anyway would love to see a proper resource. We've made some mistakes but I'm sure there's more to learn.

Re: Almost every infrastructure decision I endorse or regret

#73
> EKS

My contrarian view is that EC2 + ASG is so pleasant to use. It’s just conceptually simple: I launch an image into an ASG, and configure my autoscale policies. There are very few things to worry about. On the other hand, using k8s has always been a big deal. We built a whole team to manage k8s. We introduce dozens of concepts of k8s or spend person-years on “platform engineering” to hide k8s concepts. We publish guidelines and sdks and all kinds of validators so people can use k8s “properly”. And we still write 10s of thousands lines of YAML plus 10s of thousands of code to implement an operator. Sometimes I wonder if k8s is too intrusive.

Re: Almost every infrastructure decision I endorse or regret

#74
I feel like this is overkill for a startup.

Why not dump your application server and dependencies into rented data center (or EC2 if you must) and setup a coarse DR? Maybe start with a monolith in PHP or Rails.

None of that word salad sounds like startup to me, but then again everyone loves to refer to themselves as a startup (must be a recruiting tool?), so perhaps muh dude is spot on.

Re: Almost every infrastructure decision I endorse or regret

#76

The kitchen sink database used by everybody is such a common problem, yet it is repeated over and over again. If you grow it becomes significant tech debt and a performance bottleneck. Fortunately, with managed DBs like RDS it is really easy to run individual DB clusters per major app.

Management problem masquerading as a tech problem.

Being shared between applications is literally what databases were invented to do. That’s why you learn a special dsl to query and update them instead of just doing it in the same language as your application.

The problem is that data is a shared resource. The database is where multiple groups in an organization come together to get something they all need. So it needs to be managed. It could be a dictator DBA or a set of rules designed in meetings and administered by ops, or whatever.

But imagine it was money. Different divisions produce and consume money just like data. Would anyone imagine suggesting either every team has their own bank account or total unfettered access to the corporate treasury? Of course not. You would make a system. Everyone would at least mildly hate it. That’s how databases should generally be managed once the company is any real size.

Re: Almost every infrastructure decision I endorse or regret

#77

If you are startup that can can’t afford a DBA, then why why why are you using Kubernetes?

Because it works, the infra folks you hired already know how to use it, the API is slightly less awful than working with AWS directly, and your manifests are kinda sorta portable in case you need to switch hosting providers for some reason.
Post reply on HN