Field Notes from the Trenches - Ukeme David Eseme
Web3Bridge·Wed, Oct 9, 2024, 12:00 AM
Speaker
Field Notes from the Trenches: Ensuring High Availability and Resilience in Blockchain Node Operations - Ukeme David Eseme
Transcript
please join me as I make welcome David he going to be talking on field Notes From The Trenches a round of applause for ok David please thank you thank you oh hi hi guys hi everyone I'm so sure you're tired yeah but um I'm going to talk about something really interesting that people actually don't talk about in the web three space um I'll start by asking a question so your software your smart contracts everything you're doing in terms of software what do you think it runs on what what do you think makes it work anybody evm okay so what what's is holding the evm it what a remote server so a remote serice is what I'm going to talk about today the infrastructure side of blockchain that nobody talks about and the devop side of things right so is this coming up okay so that's going to take a while so what I'm going to tell you is for the blockchain to run there is a backbone a very important aspect which is the infrastructure the evm is not really a machine VM meaning virtual machine the evm is not a machine it's actually a software that runs on a virtual machine and there are two options for this machine is either your machine is on Prem meaning in a real place where you can physically go there and touch your machines servers and all of that or it's going to be in the cloud so when we say the cloud is not actually in the cloud cloud can I get this thing running cuz my 10 minutes are started right so now on Prem is when you have bare metal machines and then you set it up you your software ZK everything eventually becomes a binary for us devops Engineers that's the end product of the code you writing it's just a binary for us so we then take that binary and then try and configure it in a fleet of nodes at the moment we handle more than 5,000 nodes that's what actually makes your blockchain run 5,000 nodes some of these roads are remotes people run them on Prem some people run them on the cloud I want this thing up please if someone can come and check a fleet Fleet Fleet a fleet meaning like a set a set of nodes right by nodes I mean machines right so my slides are not coming up so I have some very interesting diagrams that shows the layers of the infrastructure parts of blockchain of of the entire thing so there's the layers it starts from the application layer which is actually where your smart contract runs the daps the uis then we have the consensus layer the consensus basically when you he consensus is basically a node is a is a machine running a node that does the computation right do you get we say consensus algorithm in blockchain I hope that's not big grammar because we are all technical people here that consensus algorithm is actually running on a client that is running on a dedicated server I actually want to show you how it looks yes so when we want to create a blockchain network right there's some you can't just create any network right you need to have a specific amount of nodes you would deploy right and there's a formula for that just so to keep that high resilience right so if one node goes down the other node is still running the consensus or the validator right so there's something called 2f+ 1 2f+ one is the small formula that we use to define the amount of nodes that you run in a network the F there right actually means bantine nodes so when you start learning blockchain they talk about consensus mechanism and those things and you hear them mention bantine nodes and I didn't know about that up until I started going deep into the node part of things so those bantine nodes are actually designed to in case anything happens or something fails the system can still all the networks all the nodes can still connect and you know interact and share blocks right or record blocks this is crazy oh my god do you know where my slides are I wanted to show you guys some very nice images and how okay it's not even me see anyways let's just use our imagination and try and just continue so 2f + one is what you use to define the amount of nodes that should be in a network the F there actually represents bantine nodes so in a network of seven let's say in a network of seven nodes right it means it means three is actually your original node three is a bantine node plus one which is also the bantine one of the bantine nodes to to allow that resilience so the network doesn't go down right so I want to deploy my machines how do I deploy them that's where you need to use cloud or devops tools right any Cloud engineer here any devops guy here nobody so you see why okay I know him he's my guy he from one of the AWS people yes so you see why if you come into the devop space in blockchain and you Niche you actually make a lot of money because I can count how many people who are devops engineers in blockchain here so moving forward how do I deploy these machines we use infrastructure as code right something called Terra form so I can just write some code and then tell this code I want to deploy seven machines right it's going to write the code deploy it the instance type everything once that is up there right we can now start talking about RPC nodes what is an RPC node so an RPC node is what runs that RPC protocol that actually connects the outside world to your validator nodes do you understand so I make a request I want to make a transaction that transaction goes straight to the execution Noe which is the execution client that execution client sends data to um to the validator validator does the computation sends it to the consensus consensus sends it back to you right so that's kind of like how it works I wish I could see a diagram there um but this is so unfortunate but it's fine right so you need in a network of seven validator nodes you need two RPC nodes at least two why you need one of those RPC nodes to run your foret request so if I want to request foret or some tokens for that Network that RPC node is going to handle it then you need another RPC node to handle every other request in terms of like the validator requests and execution requests and all of that so the question now is what makes the blockchain network highly available and sustainable so if one note goes down I don't have issues with any of my transaction everything is still working right this is when networking comes in and devops part of things and something called ha proxy ha proxy oh oh my God no no no no well it's fine h ha proxy actually stands for high availability proxy right so once you make a request for a specific transaction it goes to the HH proxy H proxy handles all the loads right and it tries to balance and distribute all the transactions or requests to different validator nodes time's up do you get so that's kind of like the entire J that's kind of like the entire J I advise people to go into blockchain for devops because there's less competition and it's actually very very interesting and you PD one handling managing the servers deploying the servers configuring the servers imagine managing a th000 fleet of nodes for Solana just imagine that kind of thing right if it goes down is you if it doesn't is still you you work on the architecture and all of that so that's pretty much it thank you so much for your time I'll post my slides online um thank you
Automatic transcript — names and jargon may be misspelled.