Web Application To Microservices (Microservices — Part 01)

Monolithic architecture

Advantages of Monolithic

  • Ease of development and monitoring
  • Less latency
  • Less complication about crosscutting concerns

Drawbacks of Monolithic

  • This simple approach has a limitation in size and complexity.
  • Application is too large and complex to fully understand and made changes fast and correctly.
  • The size of the application can slow down the start-up time.
  • You must redeploy the entire application on each update.

Microservices Architecture

Advantages of microservice architectures

  • Improved productivity
  • Better resiliency
  • Independently scalable
  • Independently deployable and allow for more team autonomy
  • Reduce downtime through fault isolation
  • The smaller codebase enables teams to more easily understand the code, making it simpler to maintain.

Disadvantages of microservice architectures

  • Microservices create different types of complexity than monolithic applications for development teams.
  • Interface control is even more critical
  • Up-front costs may be higher with microservices

Scale Cube in Microservices

  • X-axis: The application should be able to scale out through the x-axis.
  • Y-axis: It should be able to functional decomposition
  • Z-axis: Each server runs an identical copy of the code. However, each server is responsible for only a subset of data.

Characteristics of Microservices

  1. Microservice architectural style is an approach to developing a single application as a suite of small services.
  2. Services are built around business capabilities, independently deployable and packaged, each running in its own process.
  3. Each Service should have a separate database layer.
  4. Each Service can have an independent codebase, CI/CD tooling sets.
  5. Each Service can be tested in isolation without dependent on other services.
  6. Each service can pick the best technology stack for its use cases (no need to stick into one framework throughout the entire application).
  7. Each Service should have monitoring and troubleshooting capabilities for the operation team
  8. Services should implement Retry functionality in case of network failure or system failure
  9. Each Service can implement an independent security mechanism
  10. The main difference between SOA and MicroServices is that a microservice employs a practice that attempts to eliminate any dependencies on other microservices. SOA does not make this
    practice explicit as a requirement.
  11. Services can use HTTP(Rest) or message for communication or any other lightweight communication protocol.
  12. Well understood Distribution Transaction management
  13. Presenting API
  14. Clean and Clear Separation of Stateless and Stateful Services
  15. Do Not Share Libraries or SDKs
  16. Each Service can be run without waiting for another service to go online
  17. Implement a Self-Registration and Discovery Mechanism
  18. Service can use different language, framework, and technologies
  19. Maintain Independent Revisions and Build Environments to maintains compatibility with other services.
  20. An architect can explicitly check for rules and constraints.

Monolith vs. microservices

  • Ease of implementation — You might think that monolithic systems would be easier to implement since the software comes from a single vendor. That’s not always the case. Because monolithic systems tend to be complex, they may be as difficult to roll out as multiple individual platforms. One area where they can have an advantage is that monolithic systems are a one-stop shop for support — but that’s only an advantage if the vendor has a reputation for good support.
  • Vendor lock-in — Typically, monolithic systems attempt to cover a broad set of related functions. A monolithic web hosting platform, for instance, might include not just a web server that handles HTTP requests on the server-side but also firewalls, load balancing, and a content distribution network. But because they’re designed to “do it all,” monolithic systems typically don’t work well with other systems.
  • Control and ownership of their data — Monolithic systems don’t make it easy for organizations to integrate the data from their systems. You typically can use your data only within the monolith. For example, a monolithic analytics system that includes data integration, ETL data pipelines, a data warehouse, and analytics software may not provide tools that permit organizations to access their own data to integrate it with other systems or run analytics using different software.
  • Return on investment (ROI) — There’s no point in rolling out any application without a positive ROI. Whether you’re developing your own applications or deploying SaaS solutions, your software engineering team can create microservices relatively quickly, roll them out as they’re ready, and let customers (external or internal, depending on the application) begin using them. You can get a faster time to market and a positive ROI from your services incrementally as you deploy them.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Arun prashanth

Arun prashanth

Software Engineer at Virtusa (Pvt) Ltd.