Publicité
Publicité

Contenu connexe

Publicité

MICROSERVICES ARCHITECTURE unit -2.pptx

  1. MICROSERVICES ARCHITECTURE Unit -2
  2. • Microservices architecture (often shortened to microservices) refers to an architectural style for developing applications. • Microservices allow a large application to be separated into smaller independent parts, with each part having its own realm of responsibility. To serve a single user request, a microservices- based application can call on many internal microservices to compose its response.
  3. • Containers are a well-suited microservices architecture example, since they let you focus on developing the services without worrying about the dependencies. • Modern cloud-native applications are usually built as microservices using containers.
  4. • A microservices architecture is a type of application architecture where the application is developed as a collection of services. • It provides the framework to develop, deploy, and maintain microservices architecture diagrams and services independently.
  5. monolithic architecture • A monolithic architecture is the traditional unified model for the design of a software program. Monolithic, in this context, means "composed all in one piece." According to the Cambridge dictionary, the adjective monolithic also means both "too large" and "unable to be changed.
  6. Defining Monolithic Architecture • Monolithic architecture is a unified development model for software applications. It has three components: – Client-side user interface – Server-side application – Data interface • All three parts interact with a single database. Software built on this model operates with one base of code. As a result, whenever stakeholders want to make updates or changes, they access the same set of code. This can have ripple effects that impact user-side performance.
  7. Monolithic architecture for software explained • Monolithic software is designed to be self- contained, wherein the program's components or functions are tightly coupled rather than loosely coupled, like in modular software programs. • In a monolithic architecture, each component and its associated components must all be present for code to be executed or compiled and for the software to run.
  8. • Monolithic applications are single-tiered, which means multiple components are combined into one large application. Consequently, they tend to have large codebases, which can be cumbersome to manage over time.
  9. • Furthermore, if one program component must be updated, other elements may also require rewriting, and the whole application has to be recompiled and tested. • The process can be time-consuming and may limit the agility and speed of software development teams. Despite these issues, the approach is still in use because it does offer some advantages. • Also, many early applications were developed as monolithic software, so the approach cannot be completely disregarded when those applications are still in use and require updates.
  10. Key components of monolithic applications Monolithic applications typically consist of multiple components that are interconnected to form one large application. These components may include these features: • Authorization. To authorize a user and allow them to use the application. • Presentation. To handle Hypertext Transfer Protocol requests and respond with Hypertext Markup Language, Extensible Markup Language or JavaScript Object Notation. • Business logic. The underlying business logic that drives the application's functionality and features. • Database layer. Includes the data access objects that access the application's database. • Application integration. Controls and manages the application's integration with other services or data sources.
  11. Disadvantage: • Large and Complex Applications: For large and complex application in monolithic, it is difficult for maintenance because they are dependent on each other. • Slow Development: It is because, for modify an application we have to redeploy whole application instead of updates part. It takes more time or slow development. • Unscalable: Each copy of the application will access the hole data which make more memory consumption. We cannot scale each component independently. • Unreliable: If one services goes down, then it affects all the services provided by the application. It is because all services of applications are connected to each other. • Inflexible: Really difficult to adopt new technology.It is because we have to change hole application technology.
  12. Microservices architectural • In recent years, the rise of the internet and the ubiquity of mobile computing have made it necessary for application developers to design their applications focusing on a lightweight, self- contained component. • Developers need to deploy applications quickly and make changes to the application without a complete redeployment. This has led to a new development paradigm called “microservices,”
  13. Microservices architectural style • A microservices architecture consists of a collection of small, autonomous services. Each service is self-contained and should implement a single business capability within a bounded context. A bounded context is a natural division within a business and provides an explicit boundary within which a domain model exists.
  14. Microservice provide • Highly maintainable and testable • Loosely coupled • Independently deployable • Organized around business capabilities • Owned by a small team The microservice architecture enables the rapid, frequent and reliable delivery of large, complex applications. It also enables an organization to evolve its technology stack.
  15. • Microservices architecture was developed to overcome monolithic architectural approaches to application development challenges and difficulties. • Applications running on microservices architecture are deconstructed and separated into smaller units (microservices) that the client can access using an API gateway. These microservices are each independently deployable but can communicate with one another when necessary.
  16. • Breaking down an application into microservices allows for faster development, easier bug detection and resolution, smoother maintenance, flexibility, and higher availability and scalability.
  17. How does Microservices Architecture work? • Microservices architecture focuses on classifying the otherwise large, bulky applications. • Each microservice addresses an application’s particular aspect and function, such as logging, data search, and more. Multiple such microservices come together to form one efficient application.
  18. • This intuitive, functional division of an application offers several benefits. The client can use the user interface to generate requests. • At the same time, one or more microservices are commissioned through the API gateway to perform the requested task. • As a result, even larger complex problems that require a combination of microservices can be solved relatively easily.
  19. • Besides for the services themselves, some other components appear in a typical microservices architecture: • Management/orchestration. This component is responsible for placing services on nodes, identifying failures, rebalancing services across nodes, and so forth. • Typically this component is an off-the-shelf technology such as Kubernetes, rather than something custom built.
  20. • API Gateway. The API gateway is the entry point for clients. Instead of calling services directly, clients call the API gateway, which forwards the call to the appropriate services on the back end.
  21. Advantages of using an API gateway include • It decouples clients from services. Services can be versioned or refactored without needing to update all of the clients. • Services can use messaging protocols that are not web friendly, such as AMQP. • The API Gateway can perform other cross- cutting functions such as authentication, logging, SSL termination, and load balancing. • Out-of-the-box policies, like for throttling, caching, transformation, or validation.
  22. Key benefits of microservices architecture • About 87% of those who have adapted to the microservices architecture believe that it could soon become the favorite application of executives and project managers as it is now of developers. • They are in tune with how the corporate owners intend to build, run and maintain their teams.
  23. • Using microservices architecture in application development can be highly beneficial. Below are some of its key benefits.
  24. • Requires less development effort to scale up • Provide better scalability • Can be deployed independently • Microservices offer improved fault isolation • No dependence on one Tech Stack • Small, focused teams • Small code base
  25. • Mix of technologies • Data isolation
  26. Challenges • The benefits of microservices don't come for free. Here are some of the challenges to consider before embarking on a microservices architecture. • Complexity • Development and testing • Lack of governance • Network congestion and latency • Data integrity
  27. • Management • Versioning • Skill set
  28. Microservices tools • Building a microservices architecture requires a mix of tools and processes to perform the core building tasks and support the overall framework. Some of these tools are listed below.
  29. Disadvantages of Microservices • Higher Complexity • Increased Network Traffic • Increased Development Time • Limited Reuse of Code • Dependency on DevOps • Difficult in Global Testing and Debugging • Communication between services is complex • Large vs small product companies
  30. Higher Complexity • Although microservices offer many advantages, they also come with a higher degree of complexity. This complexity can be a major challenge for organizations that are not used to working with microservices. Additionally, because microservices are so independent, it can be difficult to track down errors and resolve them.
  31. • Increased Network Traffic • Since microservices are designed to be self- contained, they rely heavily on the network to communicate with each other. This can result in slower response times (network latency) and increased network traffic. In addition, it can be difficult to track down errors that occur when multiple microservices are communicating with each other.
  32. • Increased Development Time • Microservices also require more development time than monolithic applications since microservices are more complicated and require more coordination. Additionally, because microservices are deployed independently, it can take longer to get them all up and running. Also, developers need to be familiar with multiple technologies in order to work on a microservice- based application.
  33. • Limited Reuse of Code • Microservices also have a limited ability to reuse code, which can lead to increased development time and costs because microservices are typically written in multiple programming languages and use different technology stacks. Therefore, it can be challenging to share code between microservices.
  34. • Dependency on DevOps • In order to be successful with microservices, organizations need to have a strong DevOps team in place. This is due to the fact DevOps is responsible for deploying and managing microservices. Without a good DevOps team, it can be difficult to successfully implement and manage a microservice-based application.
  35. • Difficult in Global Testing and Debugging • Testing and debugging a microservice-based application can be difficult because the application is spread out across multiple servers and devices. In order to effectively test and debug an application, you need to have access to all of the servers and devices that are part of the system. This can be difficult to do in a large, distributed system.
Publicité