✅ Web development Interview Questions with Answers Part-8
71. What is MVC architecture?
MVC separates concerns into three parts:
• Model: Handles data and business logic
• View: Handles UI
• Controller: Handles user input and flow
This separation improves maintainability and testing.
72. What is the difference between monolithic and microservices architecture?
Monolithic architecture is a single deployable unit, simpler to start with, but scales as a whole. Microservices architecture splits functionality into independent services, more complex, but scales independently. Choice depends on team size and complexity.
73. What is an API gateway and why is it used?
An API gateway:
• Sits between clients and services
• Handles routing, auth, rate limiting
• Simplifies client communication
• Centralizes cross-cutting concerns
74. What caching strategies do you use in web applications?
• Client-side caching for static assets
• Server-side caching for frequent queries
• CDN caching for global delivery
Cache invalidation is handled carefully.
75. What is a CDN and how does it help performance?
A CDN:
• Serves content from locations closer to users
• Reduces latency
• Reduces server load
• Improves global performance
76. What is load balancing?
Load balancing:
• Distributes traffic across servers
• Improves availability and fault tolerance
Common methods include round robin and least connections.
77. What is the difference between scalability and performance?
• Performance: Speed for a single request
• Scalability: Handling increased load
A fast system that fails under load is not scalable.
78. What is the difference between horizontal and vertical scaling?
• Vertical scaling: Adds more resources to a server
• Horizontal scaling: Adds more servers
Horizontal scaling is more resilient.
79. What is the difference between WebSockets and HTTP?
• HTTP: Request-response based
• WebSockets: Persistent, two-way communication
Use WebSockets for real-time features like chat.
80. How do you handle file uploads securely?
• Validate file type and size
• Rename files to prevent collisions
• Store files outside the public directory
• Scan files when required
Double Tap ♥️ For Part-9
Post #3442
4.05K
- ❤ 12
- 🥰 2