The Open-Closed Principle (OCP) is used to achieve an extensible design for maintaining modules or classes. The principle itself applies to both classes and modules.
Horizontal scaling can be understood as scaling out by duplicating, while vertical scaling involves upgrading the resources of the individual instance.