Designing a microservices architecture for a retail application requires a strategic approach to ensure both scalability and modularity. First, I would start by identifying the core functionalities of the retail application, such as inventory management, order processing, payment systems, and customer service. Each of these functionalities would be developed as independent microservices, allowing them to scale independently based on demand.

To ensure scalability, I would leverage cloud services like AWS or Azure, which provide auto-scaling features. This would allow each microservice to handle increased loads without affecting the overall system performance. Additionally, I would implement load balancing to distribute traffic evenly across services.

For modularity, I would focus on defining clear API contracts between microservices. This ensures that each service can be developed, deployed, and maintained independently. Using RESTful APIs would facilitate communication between services, and tools like Swagger could help document these APIs for better collaboration with cross-functional teams.

To maintain data consistency across services, I would consider using a distributed database system like PostgreSQL or MySQL with appropriate data partitioning strategies. Implementing asynchronous communication using message queues like RabbitMQ or Kafka would help in decoupling services and improving system resilience.

Finally, I would adopt Agile methodologies to iteratively develop and refine the architecture, incorporating feedback from stakeholders to ensure the solution aligns with business goals and customer needs. This approach not only enhances the application's scalability and modularity but also ensures it remains adaptable to future changes.