▲ | chipsrafferty 9 days ago | |||||||||||||
I think the most common way to approach that problem would be to have a "default config", and overrides. Could you go into more detail about why you didn't do this instead? Downsides with your approach is: 1. Now whenever you want to change something both in Europe and (assuming) USA you have to do it in 2 places. If the change is the same for both, in my system, you could just update the default/shared config. If the change is different for both it's equally easy, but faster, since the overrides are smaller files. 2. It's not clear what the difference is between Europe and USA if there is 1 line different amongst thousands. If there are more differences in the future, it becomes increasingly difficult to tell the difference easily. 3. If in the future you also need to add Africa, you just compounded the problems of 1. and 2. | ||||||||||||||
▲ | MrDarcy 9 days ago | parent [-] | |||||||||||||
I don’t do this because with a complete copy I get progressive rollouts across regions without the complexity of if statements and feature flags. That is to say, making the change twice is a feature not a bug when the changes are staggered in time. From an operational perspective it’s much more important to ensure the code is clear and readable during an incident. Overrides are like inheritance. They are themselves complex and add unnecessary cognitive load. Composition is better for the common pieces that never change across regions. Think of an import statement of a common package into both the Europe and North America folders. I easily see the one line diff among hundreds of thousands using… diff. Regarding Africa, we’ve established 1 is a feature and 2 is a non issue, so I’d copy it again. This approach scales both as the team scales and as the infrastructure scales. Teammates can read and comprehend much more easily than hierarchies of overrides, and changes are naturally scoped to pieces of the whole. | ||||||||||||||
|