the event driven architecture or Eda pattern is taking center stage in modern software design with the rise of microservices big data and real-time processing companies need scalable and flexible way to handle interactions between different components in today's video we'll break down the even driven architecture pattern explore why it is gaining popularity and dive into real world case studies of companies like Netflix and Uber who are leading the way in using this architecture to handle billions of events daily let's Jump Right In as your application expands and new services are introduced the traditional request response model becomes less efficient in a simple case service a requests data from service B which processes the request and sends a response however as more services are introduced managing this interactions become exponentially complex consider this for every interaction you need to define a request and response when there are only few services this may seem manageable but as more services are added the web of connections quickly spirals out of control each service must be aware of and capable of handling requests from multiple other services and this leads to tightly coupled interactions making the system difficult to scale and evolve introducing or updating a service can disrupt the entire network of connections this is where even driven architecture comes into play ETA offers a streamlined alternative by decoupling Services through the use of events allowing for more scalable flexible and efficient system designs at its core an even driven architecture is a software design pattern where Services communicate through the generation propagation and consumption of events an event is simply a signal that something significant has happened whether it's a user clicking a button a new order being placed or a device sending data in Eda instead of services calling each other directly they respond to events making it easier to scale decouple components and handle real-time data efficiently and there are two main components in even driven architecture even producers are the components of services that generate events for instance in an e-commerce application the order service can be an producer when a new order is placed it produces an event like order placed or payment completed event consumers are the components that respond to events in our example the inventory service might consume the order placed event to reduce the stock of items while the shipping service might consume the event to start processing the shipment this model completely decouples the producer and the consumer they don't need to know about each other as long as they are connected through a common messaging infrastructure they can communicate via events as one of the largest media streaming platforms n handles over a billion events each day the platform uses even driven architecture to manage multiple operations from streaming data analytics to recommendations and error handling and here is how Netflix utilizes Eda every action you take on Netflix whether it is starting a new show rating a movie or pausing a stream it produces an event this information is gathered in real time and sent to different services like the recommendation engine for instance if you start watching a new show that event is immediately consumed by the recommendation service which updates your list with similar content you might enjoy Netflix's architecture continuously monitors every service's Health if a service starts to slow down or fails events are generated and the monitoring service consumes those events to alert Engineers or trigger automatic recovery processes by using Eda Netflix can handle massive amounts of real-time data scale its services independently and ensure users receives personalized recommendation instantly all without tightly coupling services and similarly Uber operates on a massive scale handling millions of RS across the globe every day Uber uses an even D architecture to manage both real-time data processing and coordination between Services here is how so when a user request a ride an event like ride requested is produced this event is consumed by multiple services so matching service finds an available drivers based on the user's location an ETA service estimates the time of arrival the pricing service calculates the right cost based on factors like distance and demand and each of the services consumes the same right requested event but responds in a different way Uber also has the ability to collect real-time traffic data through Telemetry events from driver's phones this data is consumed by the routing service which provides optimized routes and updates driver apps in real time Uber's Eda allows the platform to process high frequency events like right requested location updates and pricing changes with high efficiency and fall tolerance now recently I have explained the concept of service mesh and sidecar pattern even Ren architecture service mesh and the sidecar pattern are all patterns used in Microsoft Services architecture but they solve different problems Eda is all about event based asynchronous communication whereas service mesh deals with managing synchronous communication between services in systems where both even driven and synchronous communication are needed the two patterns in fact can work together for example synchronous API calls between Services can be managed by the service mesh while even driven communication flows asynchronously service mesh buils on the sidecar pattern by utilizing side cars or proxies to manage Network traffic between microservices so Netflix uses ETA to manage real-time user events like watching pausing or rating content this events trigger multiple Downstream services asynchronously such as recommendation engines or analytics systems while even driven communication is asynchronous Netflix still need synchronous service to service communication for real-time decisions such as fetching data from its catalog service or streaming services a service mesh would manage these synchronous calls ensuring that the r rise load balancing and traffic routing are handled transparent ly and each microservice in netflixx architecture has a side card proxy which might manage tasks like encryption for securing data streams logging user events and service Discovery to ensure the right services are talking to each other scalability is one of the primary reasons companies adopt even driven architecture since producers and consumers are decoupled Services can scale independently and this makes it easier to handle spikes in traffic or workload now there are two main styles of Eda simple event processing and complex event processing in simple event processing an event triggers a simple reaction for example an order placed event triggers the inventory service to update stock and the shipping service to prepare an order this is straightforward and easy to implement in more advanced scenarios multiple events are aggregated and analyzed to detect patterns or trends for example Uber's pricing system might look at traffic demand and Driver availability to trigger search pricing and this style allows for more advanced decision making based on event data when designing an even driven system there are few components that are crucial event producers are the microservices or systems that generate events an event could represent something like user action for example a purchase or a system change for example a data update even broker like Kafka rabbit mq or asure service bus sits between the producers and consumers it act as an intermediary that handles events by either queuing or streaming them producers send events to the broker and the broker forwards these events to Consumers some systems might have both publisher and subscribers The Publishers and events and the subscriber receive events from the event broker in a pops up model and this ensures asynchronous communication between Services event consumers are services or systems that consume the event they can trigger various actions such as storing data in a database saving to a file system or interacting with different applications you also need to Define clear event types and contracts so that consumers know how to process each event for instance an order placed event might include field like order ID product details and payment status we will do a deep dive on various event types and contracts in my future video video now while Eda provides many benefits it also comes with challenges in large systems ensuring events are processed in the correct order can be difficult and since events can be reprocessed in case of failure you must ensure that actions like deducting stock or processing payments aren't performed multiple times furthermore managing eventual consistency across multiple Services requires careful planning and design as real-time event processing doesn't always guarantee immediate consistency finally there are several tools available for building an even R system Apache Kafka is a high scalable messaging platform widely used for real-time data streaming and even driven systems companies like LinkedIn and Uber uses scafa to handle millions of events per second Amazon's cloud-based messaging services are ideal for even driven architecture built on AWS rabbit mq is another lightweight messaging broker that is easy to set up and use for smaller scale even driven systems these tools make it easier to implement even driven architectures that can scale and handle real-time processing efficiently as you have seen with Netflix and Uber Ada is more than just a trend it's the backbone of systems that handle billions of events every day [Music]