Skip to main content

Explain horizontal and vertical scaling in microservices.

Mid Microservices
Quick Answer Horizontal scaling: add more instances of a service. Stateless, easy to add/remove instances, scales well. Vertical scaling: give the existing instance more CPU/memory. Simpler, no code changes, but has hardware limits and requires restart. In microservices, horizontal is preferred. Scale the specific service that's the bottleneck, not the whole system.

Answer

Horizontal: Add more instances (preferred).

Vertical: Add more CPU/RAM to a single instance (limited).

S
SugharaIQ Editorial Team Verified Answer

This answer has been peer-reviewed by industry experts holding senior engineering roles to ensure technical accuracy and relevance for modern interview standards.

Want to bookmark, take notes, or join discussions?

Sign in to access all features and personalize your learning experience.

Sign In Create Account

Source: SugharaIQ

Ready to level up? Start Practice