logoalt Hacker News

lawnchairyesterday at 10:23 AM2 repliesview on HN

Author here. You are right that splitting by microservice reduces overlap. The problem is shared resources never go away such as VPCs IAM or databases so contention shows up there.

Splitting state files is the common workaround but that only creates new problems like cross state dependencies and orchestration glue. The real issue is the storage model which is a single JSON blob with a global lock. Treating state as a graph with proper concurrency control avoids contention while keeping a cohesive view of infrastructure.


Replies

spinningarrowyesterday at 10:45 AM

Do you have an example you can share?

We have about 30 services with each managing their own terraform state. We also have a shared infra repo managing some top level items. We haven’t run into any issues (with any regularity at least) that I can think of but I’m wondering if this could be a good tool for us as we grow and things become even more complex?

show 1 reply
giveitayesterday at 12:23 PM

Thanks this is fascinating. I now have a thread to pull on as I want to understand how my corp does this.