Press "Enter" to skip to content

OLX Group Running a Robust Real-Time Messaging Platform

OLX Group Running a Robust Real-Time Messaging Platform
OLX Group Running a Robust Real-Time Messaging Platform

OLX Group: Running a Robust Real-Time Messaging Platform

welcome to another episode of this is my architecture today we have with it CTO 4lx India welcome with it thank you what are priests are tell us about OLX sure so OLX is into online classifieds business it’s into 40 countries and possibly the biggest online platform their buyer meet sellers operating in 40 countries are that must be a lot of technologies going and right could you please take us through some of the key architecture principles yeah to just simplify it we are looking at reliability and agility and for that we are building a lot of micro services powered by AWS right ja so it’s a micro service architecture there must be multiple services could you take us through one of the key service sure so today we can talk about chat you know so in any online classified business there are buyers there are sellers right and they need to communicate between each other yeah so what we have is a chat it’s a real-time messaging platform within the OLX app how does the architecture work so could you please take me through this yeah before before we just go about the architecture I need to also tell you about the real problem statement right so we have 50 million app downloads just in India okay what that translates into is a hundred thousand user connections always open at any given point in time which further translates into at least 20 million messages per day 20 million messages per day that’s a huge scale how you’re building this architecture how it works under the hood sure so at a meta level we have three layers first is the authentication layer the next is the messaging layer and the third is the analytics here okay and how does the authentication work out for you sure so the user is using a Android app the app connects to the API Gateway behind API gateway we have the lambda function running okay and what’s the role of lambda function sure so this lambda is nothing but a custom authorizer it returns a JWT token to the app which is then used further in the payload for all the requests okay so lambda works as a customer’s riser for you and I believe after that it goes to the chat engine right how does all that works out sure so on the chat side we have the ELB is running behind the e l means we have multiple ec2 layer or basically multi multiple easy to machines running on the ec2 machines we have a Jeopardy application server eg buddy yeah that’s an interesting choice so what can you tell us why I chose readability right so eg buddy is an exampie P based application server built mainly for real-time messaging how do you scale that you have 20 million messages per day right right sober so at any given point in time we have the auto scale running so if there is any marketing campaign and the and the traffic goes up the auto scaling kicks in all right so you scale the entire chat platform right and where do you persist your chat how do you bring persisters to the socket right so easy buddy generally runs with any flavor of my sequel what we have done is we are we are using Aurora instead of the vanilla my sequel okay Aurora why you chose Aurora not let’s the audience we also have RDS and not only easy to wire rough right so as I said right we have like 20 million messages going in here so 20 million messages per day would translate into like TVs of data in like few days okay so any any database right comes in with the problems of backups provisioning maintainability Aurora gives them gives that out of the box yeah so you have offloaded the heavy lifting part right and you also have a radius is it tow on ec2 or it’s a ElastiCache it’s a it’s an elastic cache that we are using and over here we are using basically saving the connection data like the PID the presence and the activity of the user the session data gets stored right and I also see your cough cough there so you’re streaming the chat messages right so once the message goes into Aurora it actually also gets streamed into Kafka from Kafka we basically deserialize the exam PP packet and store that into cassandra for various analytical purposes one of one of the examples could be that we provide smart suggestions okay that’s great of it how do you further scale this architecture how we are optimizing it further right so let’s go back to our design principles right operational ease and maintainability now over here we have Kafka and Cassandra write Kafka and Cassandra both are like great technologies but they come up with their own set of operational challenges with Kafka we need to maintain zookeeper as well so what we are looking at is can we replace Kafka with kinases so we would be doing pcs for that similarly for Cassandra we would be doing pocs if we can replace Cassandra with dynamodb now so you elevate the problems with manageability and operation right aspect so great job thanks for the thanks for taking us through the socket lecture thank you thank you for watching another episode of this is my architecture thank you you

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *