Wednesday, July 8, 2020
Microservice Architecture - Learn, Build and Deploy Applications
Microservice Architecture - Learn, Build and Deploy Applications Microservice Architecture Learn, Build and Deploy Microservices Back Home Categories Online Courses Mock Interviews Webinars NEW Community Write for Us Categories Artificial Intelligence AI vs Machine Learning vs Deep LearningMachine Learning AlgorithmsArtificial Intelligence TutorialWhat is Deep LearningDeep Learning TutorialInstall TensorFlowDeep Learning with PythonBackpropagationTensorFlow TutorialConvolutional Neural Network TutorialVIEW ALL BI and Visualization What is TableauTableau TutorialTableau Interview QuestionsWhat is InformaticaInformatica Interview QuestionsPower BI TutorialPower BI Interview QuestionsOLTP vs OLAPQlikView TutorialAdvanced Excel Formulas TutorialVIEW ALL Big Data What is HadoopHadoop ArchitectureHadoop TutorialHadoop Interview QuestionsHadoop EcosystemData Science vs Big Data vs Data AnalyticsWhat is Big DataMapReduce TutorialPig TutorialSpark TutorialSpark Interview QuestionsBig Data TutorialHive TutorialVIEW ALL Blockchain Blockchain TutorialWhat is BlockchainHyperledger FabricWhat Is EthereumEthereum TutorialB lockchain ApplicationsSolidity TutorialBlockchain ProgrammingHow Blockchain WorksVIEW ALL Cloud Computing What is AWSAWS TutorialAWS CertificationAzure Interview QuestionsAzure TutorialWhat Is Cloud ComputingWhat Is SalesforceIoT TutorialSalesforce TutorialSalesforce Interview QuestionsVIEW ALL Cyber Security Cloud SecurityWhat is CryptographyNmap TutorialSQL Injection AttacksHow To Install Kali LinuxHow to become an Ethical Hacker?Footprinting in Ethical HackingNetwork Scanning for Ethical HackingARP SpoofingApplication SecurityVIEW ALL Data Science Python Pandas TutorialWhat is Machine LearningMachine Learning TutorialMachine Learning ProjectsMachine Learning Interview QuestionsWhat Is Data ScienceSAS TutorialR TutorialData Science ProjectsHow to become a data scientistData Science Interview QuestionsData Scientist SalaryVIEW ALL Data Warehousing and ETL What is Data WarehouseDimension Table in Data WarehousingData Warehousing Interview QuestionsData warehouse architectureTalend T utorialTalend ETL ToolTalend Interview QuestionsFact Table and its TypesInformatica TransformationsInformatica TutorialVIEW ALL Databases What is MySQLMySQL Data TypesSQL JoinsSQL Data TypesWhat is MongoDBMongoDB Interview QuestionsMySQL TutorialSQL Interview QuestionsSQL CommandsMySQL Interview QuestionsVIEW ALL DevOps What is DevOpsDevOps vs AgileDevOps ToolsDevOps TutorialHow To Become A DevOps EngineerDevOps Interview QuestionsWhat Is DockerDocker TutorialDocker Interview QuestionsWhat Is ChefWhat Is KubernetesKubernetes TutorialVIEW ALL Front End Web Development What is JavaScript â" All You Need To Know About JavaScriptJavaScript TutorialJavaScript Interview QuestionsJavaScript FrameworksAngular TutorialAngular Interview QuestionsWhat is REST API?React TutorialReact vs AngularjQuery TutorialNode TutorialReact Interview QuestionsVIEW ALL Mobile Development Android TutorialAndroid Interview QuestionsAndroid ArchitectureAndroid SQLite DatabaseProgramming Learn, Build and Deploy Microservices Last updated on May 22,2019 27.7K Views Sahiti Kappagantula4 Comments Bookmark 1 / 3 Blog from Microservices Architecture Become a Certified Professional Microservice Architecture:From my previous blog, you must have got a basic understanding of Microservice Architecture.But, being a professional with certified expertise in Microservices will require more than just the basics.In this blog, you will get into the depth of the architecturalconcepts and implementthem using an UBER-case study.In this blog, you will learn about the following:Definition Of Microservice ArchitectureKey Concepts Of Microservice ArchitecturePros And Cons Of Microservice ArchitectureUBER Case StudyYou can refer to theWhat is Microservices,to understand the fundamentals and benefits of Microservices.It will only be fair if I give you the definition of Microservices.Definition Of MicroservicesAs such, there is no proper definition of Microservices aka Microservice Architecture, but you can say that it is a framework which consists of small, individually deployable services performing different operations.Microservices focus on a single business domain that can be implemented as fully independent deployable services and implement them on different technology stacks.Figure 1:Difference Between Monolithic and Microservice Architecture Microservice ArchitectureRefer to the diagram above to understand the difference between monolithic and microservice architecture. For a better understanding of differences between both the architectures, you can refer to my previous blogWhat Is MicroservicesTo make you understand better, let me tell you some key concepts of microservice architecture.Key Concepts Of Microservice ArchitectureBefore you start building your own applications using microservices you need to be clear about the scope, and functionalities of yourapplication.Following are some guidelines to be followed while discussing microservices.Guidelines While Designing Micr oservicesAs a developer, when you decide to build an application separate the domains and be clear with the functionalities.Each microservice you design shall concentrate only on one service of the application.Ensure that you have designed the application in such a way that each service is individually deployable.Make sure that the communication between microservices is done via a stateless server.Each service can be furthered refactored into smaller services, having their own microservices.Now, that you have read through the basic guidelines while designing microservices, lets understand the architecture of microservices.How Does Microservice Architecture Work?A typical Microservice Architecture (MSA) should consist of the following components:ClientsIdentity ProvidersAPI GatewayMessaging FormatsDatabasesStatic ContentManagementService DiscoveryRefer to the diagram below.Figure 2: Architecture Of Microservices Microservice ArchitectureI know the architecture looks a bit complex, b ut letme simplify it for you.1. ClientsThe architecture starts with different types of clients, from different devices trying to perform various management capabilities such as search, build, configure etc.2. Identity Providers These requests from the clients are then passed on the identity providers who authenticate the requests of clients and communicate the requests to API Gateway. The requests are then communicated to the internal services via well-defined API Gateway.3. API Gateway Since clients dont call the services directly, API Gateway acts as an entry point for the clients to forward requests to appropriate microservices.The advantages of using an API gateway include:All the services can be updated without the clients knowing.Services can also use messaging protocols that are not web-friendly.The API Gateway can perform cross-cutting functions such as providing security, load balancing etc.After receiving the requests of clients, the internal architecture consists of micro services which communicate with each other through messages to handle client requests.4. Messaging FormatsThere are two types of messages through which they communicate:Synchronous Messages:In the situation where clients wait for the responses from a service, Microservices usually tend to use REST (Representational State Transfer) as it relies on a stateless, client-server, and the HTTP protocol. This protocol is used as it is a distributed environment each and every functionality is represented with a resource to carry out operationsAsynchronous Messages: In the situation where clients do not wait for the responses from a service, Microservices usually tend to use protocols such as AMQP, STOMP, MQTT. These protocols are used in this type of communication since the nature of messages is defined and these messages have to be interoperable between implementations.The next question that may come to your mind is how do the applications using Microservices handle their data?5. Data Handl ing Well, each Microservice owns a private database to capture their data and implement the respective business functionality.Also, the databases of Microservices are updated through their service API only. Refer to the diagram below:Figure 3:Representation Of Microservices Handling Data Microservice ArchitectureThe services provided by Microservices are carried forward to any remote service which supports inter-process communication for different technology stacks.6. Static ContentAfter the Microservices communicate within themselves, they deploy the static content to a cloud-based storage service that can deliver them directly to the clients viaContent Delivery Networks (CDNs).Apart from the above components, there are some other components appear in a typical Microservices Architecture:7. Management This component is responsible for balancing the services on nodes and identifying failures.8. Service DiscoveryActs as a guide to Microservices to find the route of communication bet ween them as it maintains a list of services on which nodes are located.Subscribe to our youtube channel to get new updates..! Now, lets look into the pros and cons of this architecture to gain a better understanding of when to use this architecture.Pros and Cons of Microservice ArchitectureRefer to the table below.Pros Of Microservice ArchitectureCons Of Microservice ArchitectureFreedom to use different technologiesIncreases troubleshooting challengesEach microservice focuses on single business capabilityIncreases delay due to remote callsSupports individual deployable unitsIncreased efforts for configuration and other operationsAllows frequent software releasesDifficult to maintain transaction safetyEnsures security of each serviceTough to track data across various service boundariesMultiple services are parallelly developed and deployedDifficult to move code between servicesLet us understand more about Microservices by comparing UBERs previous architecture to the present one.UBE R CASE STUDYUBERs Previous ArchitectureLike many startups, UBER began its journey with a monolithic architecture built for a single offering in a single city. Having one codebase seemed cleaned at that time, and solved UBERs core business problems. However, as UBER started expanding worldwide they rigorously faced various problems with respect to scalability and continuous integration.Figure 4:Monolithic Architecture Of UBER Microservice ArchitectureThe above diagram depicts UBERs previous architecture.A REST API is present with which the passenger and driver connect. Three different adapters are used with API within them, to perform actions such as billing, payments, sending emails/messages that we see when we book a cab.A MySQL database to store all their data.So, if you notice here all the features such as passenger management, billing, notification features, payments, trip management and driver management were composed within a single framework.Problem StatementWhile UBER start ed expanding worldwide this kind of framework introduced various challenges. The following are some of the prominent challengesAllthe features had to be re-built, deployed and tested again and again to update a single feature. Fixing bugs became extremely difficult in a single repository as developers had to change the code again and again.Scaling the features simultaneously with the introduction of new features worldwide was quite tough to be handled together.SolutionTo avoid such problems UBER decided to change its architecture and follow the other hyper-growth companies like Amazon, Netflix, Twitter and many others. Thus, UBER decided to break its monolithic architecture into multiple codebases to form a microservice architecture.Refer to the diagram below to look at UBERs microservice architecture.Figure 5:Microservice Architecture Of UBER Microservice ArchitectureThe major change that we observe here is the introduction of API Gateway through which all the drivers and passenge rs are connected. From the API Gateway, all the internal points are connected such as passenger management, driver management, trip management and others.The units are individual separate deployable units performing separate functionalities. For Example: If you want to change anything in the billing Microservices, then you just have to deploy only billing Microservices and dont have to deploy the others.All the features were now scaled individually i.e. The interdependency between each and every feature was removed.For Example, we all know that the number of people searching for cabs is more comparatively more than the people actually booking a cab and making payments. This gets us an inference that the number of processes working on the passenger management microserviceis more than the number of processes working on payments.In this way, UBER benefited by shifting its architecture from monolithic to Microservices.I hope you have enjoyed reading this post on Microservice Architectur e. I will be coming up with more blogs, which will contain hands-on as well. Interested In Learning More About Microservices? Enroll Now If you wish to learn Microservices and build your own applications, then check out ourMicroservices Architecture Trainingwhichcomes with instructor-led live training and real-life project experience.This training will help you understand Microservices in depth and help you achieve mastery over the subject.Got a question for us? Please mention it in the comments section of Microservice Architecture and I will get back to you.Recommended videos for you AWS Vs Azure Cloud Platform Comparison Watch Now AWS vs Google Cloud Cloud Platform Compared Watch Now Cloud Computing with AWS II Watch Now Building Scalable Application on Cloud Watch Now What Is AWS Getting Started With AWS Watch Now Efficient Disaster Recovery with Cloud Computing Watch Now AWS Tutorial A Complete Tutorial On Amazon Web Services Watch Now Architecting in Cloud-III Watch Now AWS Certifications All You Need To Know Watch Now Microsoft Azure Tutorial Step-By-Step Tutorial In Azure Watch Now What Is Cloud Computing? A Beginners Guide To Understanding Cloud Watch Now Power The Hadoop Cluster With AWS Cloud Watch Now Architecting in Cloud-II Watch NowRecommended blogs for you How To Develop A Chat Bot Using Amazon Lex? Read Article AWS Tutorial: Introduction to Cloud Computing Read Article How To Restore EC2 From Snapshot? Read Article AWS Data Pipeline Tutorial A Data Workflow Orchestration Service Read Article AWS Resume: How To Make Your Professional Parchment Look Attractive? Read Article What is Azure? An Introduction To Microsoft Azure Cloud Read Article Understanding Amazon S3 Read Article Amazon Elastic Block Store Tutorial: All You Need To Know Read Article Everything You Need To Know About Microservices Design Patterns Read Article Top 50 Salesforce Interview Questions And Answers You Must Prepare In 2020 Read Article What is Google Cloud Plat form (GCP)? Introduction to GCP Services GCP Account Read Article Amazon Route 53: All You Need To Know About Latency Based Routing Read Article How To Get A ServiceNow Developer Instance? Read Article Introduction to Amazon CloudFormation Read Article Top 50 Azure Interview Questions You Must Prepare In 2020 Read Article AWS EC2 Tutorial : Amazon Elastic Compute Cloud Read Article What Is ServiceNow? A Cloud Solution For Your Enterprise Read Article Everything You Need To Know About Instances In AWS Read Article How To Become A Cloud Engineer? Read Article AWS Certification â" All you need to know Read Article Comments 4 Comments Trending Courses in Cloud Computing Microsoft Certified Expert: Azure Solutions A ...6k Enrolled LearnersWeekendLive Class Reviews 5 (2250)
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.