Explain how you would refactor a monolithic application into microservices while maintaining zero-downtime deployment.