thinking of this abnormal microservices
System Design practice on Codemia
Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.
Microservices architecture has become a go-to solution for modern application development due to its scalability, flexibility, and resilience. However, certain abnormal or unconventional microservices practices can arise, which may challenge the traditional understanding but offer unique advantages or address specific problems not well-handled by conventional methods. Here, we delve into some of these abnormal microservices and discuss their implications, use cases, and technicalities.
1. Stateful Microservices
The conventional wisdom in microservices architectures advocates for statelessness—where each service does not save any user session or state data internally, relying instead on external services for state management. However, stateful microservices are an abnormal approach where services maintain state, potentially optimizing performance for specific use cases.
Example: A microservice handling real-time data processing (e.g., video or audio streaming services) may need to maintain session state to provide a seamless experience.
Technical Implication: Stateful microservices must ensure data consistency and implement complex transaction management. They might use distributed cache (like Redis) or databases configured for high availability and quick data retrieval.
2. Single-instance Microservices
Typically, microservices are designed to be horizontally scalable, meaning more instances can be added to handle increased load. A single-instance microservice, by contrast, is specifically designed to run as a single instance, either due to specific resource management constraints or where horizontal scaling does not make sense.
Example: A service that manages a unique hardware device or a particular resource that cannot be duplicated or easily shared.
Technical Implication: This approach often requires sophisticated handling of failover and disaster recovery, as all operations depend on the availability of the single service instance.
3. Microservices with Mixed Technologies
While it is common to select a uniform technology stack to simplify development and maintenance, some systems might deliberately use mixed technologies across microservices. Each service might leverage the strengths of a particular programming language or technology stack, optimizing performance and functionality.
Example: A system might use Node.js for a service requiring significant I/O operations, while another service handling complex algorithms could be built with Python.
Technical Implication: This approach requires teams to be proficient in multiple technologies and potentially complicates the integration and deployment processes.
4. End-to-End Single Microservice Applications
Building an application as a single microservice that manages everything from user interface to data storage is fundamentally at odds with the microservice philosophy, which advocates for separation of responsibilities into different services.
Example: Small applications or prototypes might adopt this model to simplify deployment and reduce operational overhead.
Technical Implication: Such services are easier to deploy but can become monoliths as the application scales, requiring significant refactoring to separate into truly distinct microservices.
5. Chained Microservices Invocation
Chaining microservices, where the output of one service becomes the input of another, can create tightly coupled systems, which is usually discouraged in microservice architectures due to the risk of cascading failures.
Example: A financial transaction might flow through separate microservices for validation, processing, and finally, auditing.
Technical Implication: Robust error handling and transaction management are crucial to prevent failures in one service from affecting the entire chain.
Summary Table
| Abnormal Practice | Description | Use Case | Key Technical Considerations |
| Stateful Microservices | Services maintain state internally. | Real-time processing applications. | Data consistency, complex transactions. |
| Single-instance Microservices | Designed to run as a single instance due to constraints. | Unique hardware management. | Failover and disaster recovery. |
| Mixed Technologies | Uses different technologies across services. | Optimizing different functional requirements. | Proficiency in multiple technologies, integration complexities. |
| End-to-End Single Microservice Applications | One microservice handles all application responsibilities. | Small or prototype applications. | Simplified deployment, potential refactoring needs. |
| Chained Microservices | Output of one service is input to another. | Sequential processing tasks. | Error handling, transaction management. |
Conclusion
While these abnormal microservices practices diverge from the traditional microservices paradigm, they cater to specific needs that might not be effectively addressed by the conventional approaches. Understanding when and how to use these methodologies can greatly enhance the flexibility and effectiveness of software architectures, but they also require careful consideration to avoid potential pitfalls inherent in these approaches. Each method involves unique challenges and benefits, demanding careful planning and implementation to leverage their strengths while mitigating risks.
Related reading
- This Distributed Cache host may cause cache reliability problems after Sharepoint servers removed
- Tomcat 8 DeltaManager vs BackupManager session replication
- Tool to create mongodb sharded cluster
- Tool to load balance tasks in distributed system
- Topic Exchange vs Direct Exchange in RabbitMQ
- Totally Ordered Multicast with Lamport Clocks without FIFO
- Tracing the data flow across Distributed/Legacy systems
- Tracking an expected set of Kafka events

System Design Fundamentals
Build a strong foundation in designing scalable, reliable distributed systems.
View the courseTrack what you have practised
A free account saves your progress, solutions and study plan across every problem on Codemia.
System Design practice on Codemia
Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.