Comment by eru

3 years ago

> Configuration is opaque. Undebuggable. Unmaintainable. By its very nature. No matter what "language" you use for it.

What makes you think so? How do you define configuration?

I mean, in the extreme case you can see Python as a configuration language for the behaviour of the Python interpreter. Does that make Python a configuration language? Where do you draw the line?

Configuration is some sort of information that is stored in a text file, for reading by one or more programs, where these programs cannot meaningfully operate without this critical information in the configuration files.

If you have ever worked in the web startup industry, their use is endemic in everything. You often cannot deploy any web applciation without properly understanding tons of configuration files.

Because everyone builds applications out of services that must be glued together, and these services often glue themselves together via configuration files. The python side of the application code needs to figure out how to connect to all the databases (postgres, redis, elastic, memcached ... etc). Each of these databases sometimes needs its own configuration before it can meaninfully operate. And because everyone is using Docker, you need docker files for all of your services. The list of things that need text based configuration fiels goes on and on.

Go to any web company and ask around to see who can meaningfully understand and edit or maintain these configuration files, and you will find the majority of the people have no idea what's going on inside them. It's very common that only two people have a decent understanding of all the configs.

Now to answer your core question:

Why are they opaque and undebuggable?

Because to understand the configuration files, you have to understand the programs they are inteded for and the environments they end up in, and the language they are written in.

For example, to understand a three-line docker compose configuration for ha_proxy, you have to understand the language of docker compose, and the way configuration files are aggregated. For example, you can define some VARIABLES in one config files and have them be available for reading by another docker compose config file in a totally different place. But you have to understand under what conditions which files are included together. For instance, you can have 10 files define different values for one VARIABLE and each of them runs in a different environment. You have to understand all of this. And we haven't even gotten to ha_proxy yet. Now you have to understand how ha_proxy is influenced by the configurations you have specified. Let's say it's telling it about another server to connect to, or a directory to serve static assets from. The path of this directory depends entirely on how other docker images are composed together, which in turn is usually influenced by the contents of many other docker compose config files that are - again - spread out across many files. You need to figure out _which_ config file is used to make a certain directory available at a certain location, etc etc.

There's no tool that can debug this mess. There's no substitute for deep and intimiate knowledge about all the details of the system.

It's very possible for the whole system to collapse when you make one tiny small mistake in one configuration file. There's no tool that can help you debug what's going on.

  • > Because to understand the configuration files, you have to understand the programs they are inteded for and the environments they end up in, and the language they are written in.

    Seems like the right approach. To use something, one has to understand how to use it. Why is this unusual?

    • Your comment makes it sound like my problem with configurations is that they require understanding something.

      But that's not what I said.

      What I said is:

      > Configuration is opaque. Undebuggable. Unmaintainable. By its very nature. No matter what "language" you use for it.

      The underlying point - perhaps not metioned explicitly - is that they are way too complex for what you achieve with them.

      Of course, complex systems require a deep level of understanding. But everything being equal, complexity is a thing to avoid - when you can do it without loss of capability.