Microservices design for scalability and resilience