News for hackers. Stuff that matters.
Re:Do not do in code what can be done in infrastructure (2017) by philipov on Friday August 13, 2021 @01:27PM (#28171833)
Infrastructure is global state, and global state is the enemy
Re:Do not do in code what can be done in infrastructure (2017) by tuldia on Friday August 13, 2021 @04:37PM (#28174198)
Infrastructure are like roads, if you have to change infrastructure every time a new car model comes out then you are doing it wrong.

Global state is global state.

The enemy is your own mind.

Re:Do not do in code what can be done in infrastructure (2017) by philipov on Friday August 13, 2021 @05:29PM (#28174791)
If you are using your roads to do gps pathfinding, then you are indeed doing it wrong. Do not do in infrastructure what can be done in code. You can't version control your infrastructure, but you can version control your code.

And with cloud instances and VMs providing abstractions that don't map 1:1 to the hardware they're running on, all your infrastructure becomes code to create reproducible deployments, or serverless execution.

You don't build your roads immediately before you start driving, and destroy them after you're done, and build only as many miles of road as you need each time you go for a ride. They're not a great analogy to what we do with computers.

Re:Do not do in code what can be done in infrastructure (2017) by TimTheTinker on Saturday August 14, 2021 @12:08PM (#28181738)
> Do not do in infrastructure what can be done in code.

While I agree, I just wanted to point out that Terraform allows defining infrastructure as code.

Re:Do not do in code what can be done in infrastructure (2017) by kazen44 on Friday August 13, 2021 @02:13PM (#28172338)
in a sense, the entire internet is one massive state machine (on the routing level anyway).