ByteByteGo Newsletter

ByteByteGo Newsletter

Why State is the Hardest Thing in Software Design

ByteByteGo's avatar
ByteByteGo
Oct 01, 2026
∙ Paid

State is the information a system retains that affects its functionality in some way. For example, a website might keep track of users who have logged in. A document editor remembers the current text. A background worker logs which tasks it has completed and which ones are pending. A database stores the records written to it for as long as needed.

Any useful software usually needs to manage state to carry out its intended functionality. The difficulty is keeping the state correct even as requests overlap, servers are added, machines fail, and software changes are deployed.

Often, the common advice is to “make the application stateless”. But this advice needs explanation. It usually means making particular application servers easy to replace while putting their important state elsewhere. It doesn’t signify a complete absence of state. Understanding such a setup requires looking at why state exists, who owns it, and what happens when it becomes unavailable.

In this article, we will look at why state is the hardest thing in software development and the multiple strategies that developers can use to manage it.

What Is State?

User's avatar

Continue reading this post for free, courtesy of Alex Xu.

Or purchase a paid subscription.
© 2026 ByteByteGo · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture