The hydrohalogenation of alkyl halide goes under dehydrohalogenation reaction minus of Hx. Dehydrohalogenation is removal of a hydrogen halide. Alkyl halide goes under dehydrohalogenation reaction in presence of a base. This reaction follows E1, E1 and E2 elimination, E1 and E2 elimination reaction. See this E1, E2, SN1, SN2 like I said all these reactions will discuss in detail in reaction mechanism. Okay, here I will give you a bit of idea how this reaction works. So, first of all this 2 and this 1 stands for order of the reaction, it is second order elimination reaction, this is first order elimination reaction, okay. E2 reaction is possible with 1 degree and 2 degree alkyl halide, okay 1 degree and 2 degree Rx alkyl halide, if you have then E2 reaction possible and even reaction generally possible in tertiary alkyl halide in polar solvent. This is polar solvent, generally E2 reaction takes place in non-polar solvent, okay. So, if that was in a non-polar thing then E1 wouldn't happen. No, E1 reaction takes place in polar solvent. So, if I don't have a tertiary thing in a non-polar solvent. We won't take, we won't take. Like SN1, SN1 in E1 are similar reaction like similar in terms of the number of steps. In SN1 also will have an intermediate carbocation, 2 step reaction, carbocation forms and nucleophile attacks. Here what happens, again carbocation forms and then H plus eliminates from this, that's why it is elimination reaction, okay. So, it is similar to SN1 in terms of the number of steps involved or the intermediate forms, correct. So, it is also 2 step reaction. SN1 is substitution of nucleophile and this one is elimination. So, product is completely different. This is 1 step reaction. Okay, these 2, 3 things we must remember now and see the reaction here. Suppose we have a compound alkyl and I say carbon, carbon halogen and here we have hydrogen present, okay. Now for this reaction we use a base. The base can be small base also we can use like C2H5O minus, okay. We can also use some bulky base. In presence of bulky base the product is different. For small base the product is different, okay. We will see what product we get. What in general the steps of the reaction is, this base extracts H plus from the beta carbon. Okay, what is beta carbon here? The one which has hydrogen, right. The halogen is attached with the carbon atom. That carbon is alpha carbon, right. So, this carbon is alpha and this carbon is beta. So this base B minus extracts H plus from the beta carbon, right. And this bond pair of electron it comes over here and it comes down here to make a pi bond. This halogen atom goes out as leaving look as X minus, okay. So overall what happens? The product of the reaction is we have C double bond. C plus halide ion goes out and the conjugate asset of this base. Is this bulky or small? It's a general step of the reaction. You will see what is the bulky base and what is the small base. Okay. But in general, no it is a Edo reaction. It's Edo reaction. It's one step reaction. In general the reaction takes place like this one. The base takes H plus ion from the beta carbon and this bond pair forms pi bond here and then halogen atom goes out. Okay. Now right down. Base used for this reaction. So why is it called Edo? Because it is second order elimination reaction. The order of this reaction based on this and this. The concentration of base and the reagent. And calculate. That's why it is second order. Okay. Now firstly what is order? Order of putting in chemical kinetics. Okay. Just you understand the second order elimination reaction. Order will discuss in chemical kinetics. Okay. Right down. Base used for this reaction. The first point to write down. If we use a small base like. If we use a small base like ethoxide ion. Or hydroxide ion. C2H5O minus. If we use a small base like ethoxide ion C2H5O minus. Or hydroxide ion OH minus. Then the product. Then the major product is. The set chip product. S-A-Y-T-Z-E-F. C2H5O minus and OH minus. Hydroxide ion, ethoxide ion. If we use a small base like ethoxide ion or hydroxide ion. Then the major product of the reaction will be according to the set chip rule. Or we can also say it as set chip product. Okay. Set chip is S-A-Y-T-Z-E-F. Set chip product, the major product. Or we also call it as Z-Safe. Both are the same thing. Basically we will get more substituted elements. This means we will get more substituted alky. More substituted alky. Okay. The major product. S-A-Y-T-Z-E-F. S-A-Y-T-Z-E-F. Very first you write down. We will discuss with example. Okay. Next write down. If we use a bulky base. If we use a bulky base. Tertiary buttoxide ion. Tertiary buttoxide. Tertiary buttoxide we write like this. T stands for tertiary. V-U-O-minus. Tertiary buttoxide ion. What's the structure of that? C-H-3. Both sides C-O-minus. C-O-minus and C-H-3 group attachment. Tertiary buttoxide ion. Triethylamine. All these are large base. Sir what a large one? A bulky means a big size. Okay. That's it. Vulki. Okay. Triethylamine. Triethylamine. Etc. Then the major product of the reaction is Hoffman product. Then the major product of the reaction is Hoffman product. Okay what is Hoffman product? less substituted algae, region also we will see. But you see the reaction. Okay, suppose the alkynolide is this CS3, CH2, CBR, CS3 and CS3. And in the reaction we are using a base say C2H5O-. This is the base we are using. They can also give you C2H5O and Na like this, salt of this. Same thing here, Na plus and this minus. So this also behaves the same thing. Now one thing is here, this reaction takes place in the solvent. Right, so whatever base you are taking here, the conjugate acid of this is building the solvent. So what is the conjugate acid of this? H5OH. Just we add H plus into this. Okay, suppose you are taking OH minus as a base. Then the solvent is what? H2. This is the condition we have. We always take the conjugate acid at the solvent. Right, so this is the agent for this reaction. Now the product name, can you tell me the product? Product will be CS3, CH double bond, CH3, CS3. We also get CS3, CH2, C double bond, CH2, CS3. This is the two product you get. Okay, what is this product? This is sets of product, more substituted alkene. Right, and this is Hoffman. How this reaction proceeds? See this is the base we have. This base takes H plus ion from the beta carbon. What is the beta carbon here? This one is alpha, this one is beta and this one is also beta. Even this one is also beta. However these two positions are same position. Right, if we take H plus from here or here we get the same product. Okay, so the possibility is what? That this base, this base C2H5O minus attacks onto this hydrogen, takes H plus. This bond pair comes over here and this BR goes out as a leaving to BR minus. Product is setger product beginning. This is path A supposedly. So setger we get with path A. Now if this base falls, so this is the base, when it attacks onto this hydrogen, this is also the possibility to break. This is path B. So with this the product is what? Hoffman product The point is this base has tendency to extract this hydrogen and this hydrogen. The major product depends upon the stability of alkene. We know more substituted alkene is more stable. That's why this is the major product, setger product. Okay, so what I said that this base takes H plus from the beta carbon. It always attacks onto the beta carbon. Right, this H plus is taken up by this base and this bond pair of electron, it comes over here to form a pi bond. Right, when it comes over here, so this carbon has to lose one bond, so that it completes tetravalency. Right, so this BR minus, we know halide ions are good leaving group. Right, this BR takes this bond pair of electron and goes out as BR minus leaving group and we'll get this alkene. Okay. So does this work with fluorine also? Fluorine generally we don't use because the bond of bond strength of carbon fluorine bond is very strong. Okay, in that case we'll get a different order. Have we discussed the language? Okay, but controlling the case means the things will be different. Generally, Hoffman product is favorable there. Sir, how big does the base have to be for us to call it now? That you don't have to think about. You just have to take this C2S5 over its smaller base, over H minus ion is a smaller base. In fact, CS3O minus is also a smaller base. When you have a large base, it will be some branch will be there, tertiary group attached over. This is try ethyl amine. Right, try ethyl amine kya ho gya and ke sa three ethyl group attached. So, when you look at this group, it looks like bulky group. Right. This is a parameter of this. Yes sir, is ke baad bhiya consider the bulkiness of that group. But when you do some questions, when you solve some questions, you understand which one is bulky, which one is not bulky. Like the example that I have, you know, mostly you'll get this tertiary oxide. T, B, U, O minus. The same thing will be written in the question also. Okay. Or suppose some tertiary alcohol is there. C, CS3, CS3, CS3, and OH. That's just bulky. Tertiary groups will be considered as a bulky base. So, gaya baad hiya. Okay. This is sedgeff stable Hoffman, the minor product of this. Sometimes again, I'm telling you, across this double bond, GI is possible if these two groups are different. Suppose I have C2H5 here. Okay. But this becomes C2H5 and CS3. It means across this, geometrical isomerism is impossible. So, it's a piece of trans. Two products will be possible there. Right. Both will be equally found. Yes, equally found. This will be measured, but in this, we consider two products. Not four products. Okay. So, if they ask you number of products. Okay. So, whenever alkene is forming, always consider this geometrical isomer as per condition. Okay. Next one at hand down, makes points. Why do we take C2H5OH? How does that happen? See, any reaction takes place in the solvent. The molecules are moving, right? Yes. And in this way, only this ion will attack onto this at least. So, why it doesn't mean C2H5OH at all? Generally, see, you can use another solvent also. But the point is, we require a proper range of the reaction. So, even if you say in physical chemistry, you have a concept called electrode potential. So, electrode potential may be electrode go. There's a metal rod. Suppose it's zinc metal rod. Right. So, this will dip into a solution, which has the same ion present in it. So, condition is what? If you have zinc electrode, this will always dip into ZNS4. Then only you'll get half cell. Okay. The point is, there are many conditions. You can take another solvent also there. But in that case, the reaction is not that physical. It's difficult to proceed with the reaction. So, maybe if you use some other solvent, so the mobility of this ion is affected in that solvent. Okay. And it is, you are getting this from this only. This is not getting reacted into the, getting consumed in the reaction. So, when this H plus comes out, you see with this C2H5OH minus, O minus will get C2H5OH and BR minus goes out. So, this is not getting consumed in the reaction. If it is different, then you'll get some different product. The rate of the reaction, many things will be there. Let's affect it. And since, and that is why we are not using different solvent. Another way what you can say, that this phase, you are getting from this solvent only. This will dissociate like what? C2H5OH minus. And that C2H5OH minus will attack. So, for any, even if you see, if you take another, I will discuss that example also. Solvent, if you take water, water, why we cannot take water here? Because if you take water, water in water, oxygen also has to go on there, right? So, water also behaves as a nucleophile. So, there is possibility that this lone pair also attacks on to this hydrogen. And it is also the possible, right? To minimize that fact also, we are using the solvent of this one. You can ask if it is fair. You do it for OH minus and H2O is the solvent. Ah, that's funny. He said what? Why we cannot use another solvent here? Suppose we use water, then let me also attack on to this. That's why we are not using it. Preferably what we use, that it is the given, you know, condition. Preferably is what? Base and its conjugate acid as a solvent. That is the ideal condition for this kind of thing. Even in organic combustion, this thing is true in all the chapter.


Behind me you can probably see that there's some nasty weather coming in, while I was thinking of leaving my camping spot today and heading that direction. But thanks to an app that I use, I know that today is not the best day to travel, and so I'm going to show you now how I use it and how it helps me decide when to leave my camping spot to move to my next destination and avoid any dangerous weather, flooding, fire danger, or high winds. I'm in Oregon right now but I'll be gone by the time you guys see this, so don't worry. But before this I was headed up from Utah in the Nevada and I was getting into some hairy weather, so I pulled out weather routes and I'm going to show you now how it told me what day was the best day to leave or what time was the best day to leave and how it takes you through every little town that you're going to go through on the way. It will even give you directions and routes you with the weather next to your directions so you know what the weather is going to be like every step of the way on your trip. Those were the nicest people. Oh my gosh. Hey everybody, this is where I woke up today. I'm somewhere between Ealy, Nevada, and Eureka, Oregon, I think, and I'm on the loneliest highway, which is Highway 50, and of course you can see it snowed here last night. It's about 33 degrees, and I actually have driven about 50 miles this morning, but as you can see it's really fogged in. I decided to pull over and get some breakfast and wait for some of this fog to burn off because I am going down this pass here in a second, and the nicest people pulled over to make sure I was okay. Isn't that nice? I flashed my brights at them like five miles back on the road because there were antelope in the road, and it's really foggy, and so I flashed my lights at them to let them know that there was something in the road, and you know I pull over, I turn around, I take my time, I get the camera, I come out, and they were just standing here, which kind of freaked me out, but they just wanted to make sure I was okay. It was a couple. They thought maybe I needed help, and this is the loneliest highway in the country. There's a lot of miles between services, but I'm headed up to the Pacific Northwest, which I'm super excited about. You guys look at this.  I want to show you guys how I use this app in action because it really does exactly what I wanted to do, which is show me my route and tell me the weather in every stage along my route and when the best time to leave is. Today I'm going from Elie, Nevada to Sisters, Oregon, but before you put in your route, you can go up here to Settings and you can tell it what kind of rig you have. I selected Truck, and then you can say your average speed, I said 50, and that way they can accurately tell you what the weather is going to be along your route. They're not saying you're going 80 like everybody else, maybe, so I'm going to close out of that. Again, it can find you or you can put in your destinations and then you just hit this button and it starts to calculate. You guys, this is so cool and I've used it many times now and it is accurate, so let me show you why I left Elie before dawn this morning because it was the best time for me to get where I was going with wind and weather and they also give you updates and they can show you your route and you can plan days in advance if you want. So it says here, you'll see at the top, they automatically tell you the best time to leave is 9 a.m. Monday which it's 8.51, but I'm already past Elie. So look at what they do down here. They show you in Elie, it's 33 degrees and the wind speed is four miles an hour and then you go through White Pine which is 36 degrees 8 miles an hour and so on and it shows you each town that you're going to go to. Now look at this, this is actually why I wanted to film this today. You can see any problems that are coming up on the route. Right here as you guys know, we've had a lot of rain everywhere so there is some flooding risk on my route today, so I've got my eye on that, but here's what's cool. They've given me the temperature and weather and wind speed by town, right? But look down here, there's this toggle. So let's say, try and keep your eye up here on this 17 miles an hour. When I toggle across like this, it changes, see? So if I left at Wednesday and noon, it would be seven miles an hour, but if I left at Tuesday one, it would be 14 miles an hour, so you get the idea, right? Now let's say you want to show the extended forecast, you go up here and you can actually plan out for a week and see up here, it's changing. When I'm toggling through the dates and times, look at the weather changing and all the different towns I'm going to and then on the right, they actually change the wind speed. That's exactly what I needed it to do. On the bottom, I'm just scrolling through the different dates and times to leave and look at what it's doing with the wind speed. And let's say that I am leaving right now, then you hit map. It shows you the weather in all your different towns along your route. Very cool and you can also toggle down here. It's just that easy you guys, you do it on a slide and look, the weather changes. So I'm really, really happy with this and I don't like driving in high winds like a lot of you and because my time is my own, this really does help me plan when to leave, when to stop, when to leave, again, what route to take and I love it. It's totally free and I'll go ahead and put the link for you down below. Right now I'm around Eureka, Nevada and you guys can see that it's raining. It is getting a little windier, but you can see that the wind is still 12 miles an hour and if I continue on to Sisters Oregon, it's 12, still some danger zones in there with flooding. But then if I go all the way to here today, by this afternoon, it's going to be 21 miles an hour and I'm a little slow. So sometimes I like to just toggle forward a little and see what happens. Oh yeah, 26. I don't want to drive in that. So I'll probably keep going along the route today until I get to about Humboldt and then I'll find a place to stay overnight and then tomorrow let me search for what it would be like if I left from Humboldt and continued on. So I've gone back to the front here and just did a fresh search from Humboldt to Sisters if I do that tomorrow and I hit the little blue button and again it's going to calculate the best time for me to leave from Humboldt to go down to Sisters. So I'm going to give that a second. Best time to leave is now. Okay, I don't want to leave now. I at the most would leave tomorrow morning. So let me go forward a little bit and see what happens. If I leave at 5 a.m. tomorrow, oh it's still 21, 29 going down, I feel more comfortable, you know, driving around 14. So if I left Humboldt, it would be 14 there. I'd have to leave it 5 p.m. at night. What happens after that? Oh, it gets way better. Look at that. So this is today and this is this afternoon and this is Tuesday and it doesn't really get better until Wednesday morning. So I might stay around Humboldt for a couple of days, get there today, stay for a couple of days because I can and then head up. What would it be like then? All the way to Sisters? Great. Looks great. All the way. I know for a lot of you, driving in heavy wind or rain or whether it could be fire danger is a concern and it should be. So Weather Route is one of my favorite apps. I use it all the time. I even use it just to get the local weather. I find it to be really pretty accurate and, you know, things change. Sometimes you're slower than you say you're going to be on the app or you stopped for longer and then I just pop in and redo the route and see what the latest info says. As always, you can find me here twice a week on Instagram and Facebook at creativityrv.com. If you haven't subscribed already, please consider doing so. If you think anybody else can use this information, please do share it or give this video a thumbs up because it helps other people discover the information so that we can all have happy, safe travels and be free.


Welcome everyone. My name is Dinesh Sranee and I'm a software engineer at Portworx. Today I'm going to be talking about how you can use external persistent volumes to achieve high availability and reduce recovery times when using stateful services on DCS. So let's jump right in. Here are topics that I'm going to cover today. We'll talk about the different kinds of stateful services. Then I'll go through the advantages of using external persistent volumes. I'll also give you an introduction about Portworx and how you can deploy services on DCS to take advantage of Portworx volumes. Then I'll do a demo showing how you can install Portworx and Cassandra to use Portworx volumes and basically demonstrate failover and some other useful scenarios. So let's talk about stateful services. So there are basically two types of stateful services when it comes to persisting data. The first are simple applications which don't do their own replication. They basically rely on the underneath storage layer to be always available. So in cases of failures, the storage layer would basically make the same volume available on another node so that the application can come up with the same state. The second type is where applications do their own replication across nodes. So in case a node dies or fails, there's always another copy of the data on the cluster. So if the node that had crashed does come online, then the replication takes care of basically repairing data back onto that node that it had missed. Now this replication or re-replication or repair can either be manually triggered or it can be automatic depending on the application. So some of the examples for the first type of application are basically WordPress or MySQL which run in simple mode and don't do their own replication. Whereas for the second type, it would be Cassandra or HDFS which basically do replication across nodes and then do repairs in case of failures. So now you might be asking why is this replication strategy important? Well, it's because bad things happen all the time, right? Your nodes could crash, your network could have issues. For example, your network could get partitioned so none of your nodes are in quorum. Your disk could go down or your nodes could go down. Your entire rack could go down bringing down multiple nodes. For applications that do their own replication, there is always another copy on one of the other nodes in the cluster. So you can still continue to serve IOs and your application will not be affected by the downtime by one node being down. And if you have to replace a node, you can just bootstrap it and repair all the necessary data to it. This does end up taking a lot of time sometimes depending on how much data you had on the node that did go down. And in that time that you're repairing data to that node, your throughput for IO for that service would basically drop. For instance, if you had a Cassandra cluster that was doing replication, a three-way replication and one of your nodes goes down, you would then only be able to serve reads from two of the nodes instead of being able to serve from three of the nodes. And while the repair is going down, your network would also take a hit because all the data would need to be transferred from the two nodes back to the one node that is being bought up. For non-clustered applications, though, if you had no backup and were using local storage, your application would be doomed because you would not be able to bring it back up until you can either move your data from the nodes, data disk from the nodes that went down. And in case your data nodes actually had corruption, had physical corruption, then you will basically end up losing your data. So how can external persistent storage help in all of this? Well, for the case of applications like MySQL and WordPress, which don't do their own replication, it can help to provide high availability for your services. And it basically makes sure that your downtime is eliminated. And for services that do do their own replication, it can help reduce recovery times by a large amount because what will end up happening is you will not have to bootstrap data back to your new node. All you would have to do is basically repair data for the time that the node was down before it came back on another node. I'll talk a little bit more about this in the next slides. Another advantage of using external storage providers like Portworx is that it helps you virtualize your storage. So you can basically grow your compute and storage needs independently of each other. Okay, so before we talk about the scenarios, I just wanted to give a brief introduction about Portworx because a lot of the scenarios that we talk about depend on a software storage solution like Portworx already installed on your cluster. So Portworx is the first production ready software defined storage designed from the ground up for microservices in mind. So using Portworx, you can provision and manage container granular virtual devices. And tight integration with schedulers and container orchestrators basically help run your workload local to where the storage is provisioned. Apart from this, we also have a couple of other useful features that help manage your storage daily needs for storage. So you can basically take a copy on write snapshots which can be restored from in case you have any outage or any issue with the services that are using your volumes. You can also take something called Cloud Snaps which will basically back up your entire volumes into any object store outside your cluster. So basically that object store can be any S3 compliant object store, Azure Blob Storage or Google Cloud Storage. We also allow encryption of volumes on either a cluster level. So you can have one cluster wide encryption key or you can have encryption keys on a per volume basis. So this is very helpful in cases where you have multi tenants and you don't want to share encryption keys between different volumes and different services. Another feature of Portworx is that everything is basically API driven so everything can basically be automated. You don't have to manually go in and either provision volumes or manage your data. You can do, you can basically, this is written for DevOps from the ground up. So everything is basically automatable and you would never have to actually go in and manually do any kind of repair or recovery. And we actually run as a container ourselves so it makes it very easy to deploy and maintain. And you must have heard about CSI in the past couple of days and as soon as the schedule orchestrators have support for CSI, Portworx will also have support. So this is how basically Portworx would look once it's deployed. So Portworx would basically scan all the block devices whether it is your direct or attached storage devices or an EBS volume or Azure managed disks and carve them out into one big cluster storage pool. And when your pods or your containers are spinning up, they would basically go ahead and request for thinly provisioned volumes from this cluster storage pool. And we would basically replicate data for these volumes across nodes so that in case one of your nodes goes down, you're still able to bring up the container on another node with the same state. So here basically the orange part is what Portworx would comprise of and you would basically run different apps which would request for volumes from Portworx. So I talked about block level replication. This is how basically it would work. So all writes would basically be synchronously replicated across multiple nodes. And these replicas are actually accessible not just from the nodes where the data lies but from any node where Portworx is installed. So in case you want to scale your cluster where you have a few nodes which have more compute and memory and have separate nodes which have more storage, you can always start up Portworx as storage less nodes to consume storage from the nodes which have more storage available. And in this case, what would happen is basically all writes would basically be synchronously replicated onto other nodes. And if a node goes down, basically you would still be able to use another replica from another node. And when the node that had gone down basically comes back up, Portworx in the background would repair the data to bring that replica back up to state with the current state of the volume. And if that node goes down permanently, what Portworx would do is basically we would re-replicate that data onto another node so that you always have the minimum replication that you had specified for your volume. So now let's talk about the recovery times with local volumes and external persistent volumes. This is mostly talking about the second type of applications where applications do their own replication. Now, when tasks use local storage, they are basically pinned to that node. So with local volumes, if a node crashes, the faster that the node comes back up online is better because then you have less amount of data to repair. But in reality, that is not always the case. You could take down nodes for maintenance cycles. And in that case, your time period that the node is down could be large. So you will end up having to repair a large amount of data. And nodes do take up some time to come back up in case they had crashed. So that just extends the cycle, extends the time that you would have to repair data for. But in case that the node fails permanently, this repair time can be even longer because you would basically have to re-replicate all your data from one of the other replicas in the cluster back to that node. And this could end up taking a lot of time. It could range from anywhere between hours to days. And while this is happening, like I had mentioned before, the throughput of your service will be affected. And also, you would end up spending a lot of, you would end up spending, you would end up spending a lot of time. And this could actually bring down your entire service if you basically end up using a lot of throughput just to do the repairs. Now, let's take a look at the recovery times with external storage. So with external volumes, basically your data is accessible from any node in the cluster. So if a node does go down, you don't have to wait for it to come back up to basically to use your, to bring your service back up. All that would need to happen is your scheduler would need to schedule that service onto another node and ask for it to use the same volume and it would come back to its same state. And all you would have to do is basically repair data for the time that it took for the scheduler to reschedule your pod onto another node. And this is actually similar in case a node dies permanently too because since there's always another replica available on the cluster, you would just need to wait for the scheduler to schedule your container onto another node. And it would, again, you would just need to repair the data back onto that node for the time that the node was down. Okay, so here are some of the advantages of using Portworx or any software defined storage like Portworx for your solution. Basically, using a SAN or NAS is an anti-pattern in microservices because by using a SAN or NAS, you end up losing the flexibility that you have from microservices because you're basically saluting your storage from out into a storage array that's outside your current cluster. This also introduces latencies because for all the data that has to be written to your storage array, it needs to basically traverse from your compute cluster to your storage cluster. And it is also actually a one point of failure. So in case you lose that link between your compute cluster and your storage cluster, all your stateful services will go down at that point. And actually having an external storage provider, having an external storage array increases complexities and failures when you're dealing with node crashes and other scenarios that might happen in your cluster. So like I mentioned, Portworx is built for microservices from the ground up. And one of the things that we do is that we have tight integration with schedulers. So we can actually influence schedulers to co-locate your tasks with where the data is located instead of basically having it located anywhere. So we don't shard data across multiple, across all the nodes we make it so that containers can take advantage of having data local to the node where they're scheduled. Another advantage is that there is a common solution for hybrid deployments. So there are a lot of scenarios nowadays where companies have hybrid deployments where they have an on-prem cluster, but they want to basically burst into the cloud. Now, if you are not using a software-defined storage solution like Portworx, you would basically need to have automation and tools that were different for both your on-prem and cloud solutions. By having one unified layer of managing your storage, you can eliminate that and build your apps faster rather than having to worry about managing your storage on different deployments. Okay, so now you might ask why not just use EBS directly? So like I pointed out, first of all, EBS will work only on AWS. Same thing with other Azure Managed Disk or Google Cloud Storage. So you would basically need to have different automation and tools for your hybrid deployments. Also, EBS has a limit of 16 volumes that you can attach to any EC2 instance. So in case you have beefy EC2 instances and you want to work a lot of containers on that, you will end up hitting a limit. So you will not be able to tightly pack your services onto a node in that case. One of the most common scenarios that you would run into with EBS is actually when you're testing failover scenarios, you will see a lot of the time EBS volumes would get stuck in attaching or detaching state.  And in fact, I was just talking to somebody earlier this week and they mentioned that one of the volumes got stuck in a detaching state because they were using a volume plugin and there was no way out of it. The only thing that they could basically do was delete the EBS volumes and that is a data loss situation that you don't want to get into in production. Another thing with EBS is the performance is not always up to mark. So you can always pay for provisioned IOPS, but at that point you will end up spending a lot more money. And the last thing is failover is slow. So EBS wasn't designed for the microservices in mind, so it wasn't designed for scenarios where you would basically be failing over your containers or services very often. So it ends up taking a lot of time to failover your EBS volumes from one node to another. So there's nothing wrong with using EBS as such. I mean, the only thing is you don't want to be using EBS volumes directly with your containers. You want to have a layer on top of EBS which does the management of your container granular volumes so that you can easily failover your containers instead of having to depend on EBS doing the move for your volumes. So how can you use Portworx with your stateful services? So there are three ways that you can do this right now. So the first way is you can deploy simple services in Marathon using Portworx as the volume driver and any applications in the DCUS universe which allow you to configure an external volume provider. You can basically specify Portworx as the driver. The second way is you can basically deploy services that we've developed based on DCUS comments which are also available in the universe. I'll go through these in detail later. And we also have the DCUS comments framework which we've modified to be able to use Portworx volumes. So you can always use that to develop your own services too. All right, so this is an example of how you can use Marathon to use Portworx volumes. This is a simple example of a MySQL container that you would spin up. All you would have to do is in the parameters for your container, you would basically need to specify the volume driver as Portworx. And in the volume parameter, you would be able to specify the size for the volume, the replication factor, the name for the volume, as well as any other parameters that you want to use while creating the volume. And you don't need to pre-provision volumes at all in this case. All of this would be dynamically done. So as soon as you launch this, Messos would basically try to spin up a Docker container. We would get a request to basically mount this volume. We would see that this volume has not been created. These options would then get passed to us and we would dynamically create these volumes and mount it inside your container. And you can basically use a similar type of, similar spec to use with Docker as well as UCR. So about the DCOS Commons-based services that I was talking about, so we basically modified, enhanced the DCOS Commons framework to work with Portworx volumes. And there are basically four services that are available through DCOS Commons and you can obviously write more. But the four services that are available are Cassandra, Hadoop, Elasticsearch, and Kafka. And we've actually added support for Portworx volumes and submitted these to the UNOUS. So all you have to do is go to the UNOUS and search for Portworx and you would be able to install these four services with Portworx volumes backing the state. So we've actually made a couple of more enhancements where we've allowed for the task to fail over between nodes because there is nothing that's pinning the tasks to a particular node now since there is Portworx backing these services.  We've also made changes to the framework so that your volumes are co-located with your tasks so this reduces latencies as well as network usage. So this is an example of a Hello World program. This is basically available in DCOS Commons and the parts that I've highlighted is basically what all you would need to change to use Portworx volumes instead of the default route and mount volumes. So DCOS Commons is actually a great way to write stateful services. The only thing is right now before they add support for CSI, they only support route and mount disks which basically means that your services are pinned to a particular node. So in case that node goes down, that task is not gonna spin up on another node because that data is available only on the node that went down. So we've, like I mentioned, we've basically modified it to support Portworx volumes and all you have to do is basically change the type of the volume from route amount to Docker, then specify the Docker volume driver as PXD, the Docker volume name, which is the one name for the volume. So over there you can also specify the size of, not the size, the size is a different parameter, but you can specify the replication factor you wanna use as well as if you wanna encrypt volumes and any other parameters that you would be able to pass to Portworx. So basically you can specify any service as a spec like this and specify Docker volume drivers and Portworx to take advantage of Portworx. And all of this, again, volumes are all dynamically provisioned so you don't have to go out of band or talk to your storage provider to provision volumes. All of this will be taken automatically when the service first comes up. So the source code for this is available at github.com slash Portworx slash DCS Commons in case you wanna take a look. All right, demo time. So what I'm gonna show you is basically I'm gonna install Portworx on DCS. I'm gonna show you how easy it is to install DCS and then I'm gonna install Cassandra and go through a few scenarios to basically show, go through a couple of scenarios that you could encounter in your production. Let me just open it up again, sorry. Yeah, so basically Portworx as well as all the other services I specified are available in the universe so all you have to do is go and search for Portworx. We're gonna select Portworx service and so we have a six node cluster which is basically five private nodes and one public agent and we're gonna install Portworx on the five private agents. We're gonna specify the management and data interface that we wanna use and just click review and deploy.  So we use HDD to store our control plane state. So it's all gonna spin that up. It's gonna spin up Influx DB which we use to store statistics. It's also going to spin up Lighthouse which is our UI and finally it's going to install Portworx on all the five private agents. So I sped up the video a little because it ends up taking around five, six minutes to install but as you can see the HDD cluster got installed and the proxy got installed Influx DB got installed and Lighthouse got installed. So basically what's happening now is the Portworx Portworx is basically getting installed on all the nodes. And if you go to completed you'll see there are five tasks for the Portworx install that finished. So basically what I'm doing now is I have assessed into one of the private agents and I'm just gonna watch for the status from PixiCuddle which is our CLI and wait for all the nodes to come up. So as you can see, three nodes I have come up and I have purposely not attached a disk to one of the nodes. So you can see that all of these automatically get provisioned, get added to a cluster as either a storage node or a storage list node depending on if there were block devices attached to that node or not. So I'm just gonna pause it here for a second and then basically the cluster is up now and as you can see we have five nodes in the cluster four of these nodes have 400 GB disk attached to them whereas one of them is basically a storage list node. So now that the Portworx cluster is up what we're gonna do is we're gonna go ahead and spin up a three node Cassandra cluster on top of this. And so again the Cassandra Portworx service is available in the universe. I'm just gonna show you that there are no volumes created initially. So you just need to run pixicurl volume list and you can see there are no volumes. So now you're going to go back into the catalog and search for the Portworx Cassandra service. And we don't really have to change anything but by default the options are not specified because it depends on what you want to provision it as but we're gonna go ahead and specify that we want a Portworx cluster with the replication factor of three and this is basically gonna create three 10 GB volumes and attach them to each one of the Cassandra nodes. All right so we just have to click review deploy and then deploy and we're gonna look at the state of the service. Again I've sped it up a little because it takes time for Cassandra just to spin up to pull the artifacts but as you saw one of the nodes that spun up and it automatically provisioned the 10 GB volume with the replication factor of three and attached it to a node whose IP ends with 151 which we'll see from the DCOS UI is where the Cassandra node had spun up. So the second node comes up and then the third node comes up. So at this point all three volumes will be provisioned. We'll just take a look, just do a volume list again and we see that all three volumes have been created with the replication factor of three. So all we had needed to do was specify the base name for the volume and then for node zero it basically created Cassandra zero, Cassandra one and then Cassandra two. So now that the cluster is up, one of the scenarios that I was talking about was what happens if your node fails. So if you didn't have something like Portworks running providing storage to your Cassandra cluster the framework would basically keep retrying waiting for the node to come back up and it would not start it on another node unless you manually went in and said that you want to replace a node. Now if you replaced a node you would basically need to run a bootstrap and a repair command again which could be expensive. What's going to happen here is since we have replicated the data across nodes as soon as we kill the node so I'm just going to go ahead and kill one of the nodes where the task is running I'm just going to power it off. What we're going to see is that the framework is going to realize that there's nothing for the task that is pinning it to that node. And as you can see DCO has already figures out that the node is offline and the framework is also going to realize that the node has gone offline. There's nothing, all it requires from a node is our CPU memory and this and data that is not really pinned to a node. So it's going to basically go ahead and spin up that same Cassandra node onto another node which was node ending with 131 which is A3. So I'm just going to go back into A3 and we'll just run pixicural volume list which will show us that the volume has now been attached onto this node. Oh yeah, if you check status that's the node that we actually took down. And if you do a volume list you'll see that Cassandra too that's the task that we had killed basically comes up is basically attached to the new node right now. Now one more thing you must have noticed is that I actually just allocated 10 GB of data to each one of these nodes. Now if you're running in a production cluster and you spun up this cluster and gave it to the production guys to use you would soon realize that this is not enough. Now if you were not using something like Portworks underneath what would need to happen is you would need to spin up an entire new cluster and allocated more space. But with Portworks all you really need to do is I'm just showing the output of DF over here and you can see that the volume which is mounted under valuable SD mounts Cassandra 0 has a size of 9.8 GB, roughly 10 GB. So what we're going to do here is we can actually dynamically resize this volume so that you don't really need to take your application or service offline. All you need to do is run once a simple command and it will automatically resize your volume. So all these commands that I'm showing I'm using the CLI just to make it clear but all of these are actually using the same REST API interface that you can automate against. So basically you can check that as you can dynamically, you can list your volumes, you can even provision your volumes and even if you want to update the size of your volumes all of that can be driven through APIs. So at this point all an admin or a DevOps person would need to do is run a command or use the REST API to basically update the volumes size. So I'm just going to basically update the size to 100 GB. And this just takes a few seconds and if I check DFI 5 and S you'll see that this volume is now 100 GB volume. And this will basically be available to your application right away. So you don't have to take it down or do any kind of maintenance for this. I think I lost my slides. All right, so that's the end of the presentation. Any questions? So we actually evaluating port works to be production ready inside our company.  It is the following. So we're using DCOS Marathon PXD driver, right? And we wrote some disaster recovery tests. So basically killing the node and checking the if not successfully rejoin the cluster. What actually happens is that Docker D after reboot is getting stuck for 15, 12 minutes, actually logging that PXD driver is inaccessible. Yes. After some internal timeout it proceeds and then picks it up. And the reason for that is that port works itself is inside container, right? So it's really chicken neck. Yes. So what would you suggest to work around the problem? Yes, so we have encountered that problem. That is actually a limitation with Docker. The way the Docker works is every time it starts up, it queries for all the volumes that it knew. And it basically tries to talk to the plugin to figure out what the state of the volume is. So the way we've worked around this is we're basically applying to roll out port works where you would install it as a run C container instead of deploying it as a Docker container. So there would be no dependency between Docker and port works in that case. So what would happen is you would kill Docker but port works would still be up and running. And Docker would basically go ahead and query port works for all the volumes and it would not block at that point. Yeah. Any other questions? So with the block level replication, what kind of speed hit would we be seeing with port works? Because it's having to send it out, but what kind of performance will we be looking at to replicate a block layer like three replicas? So anything greater than one replica, there will be a slight performance hit because obviously you're sending packets across the network and what we've seen is the hit is between three and 5%. So there is a small hit but at that cost you're basically getting an added advantage of getting high availability and all the other features that the storage layer provides in this case. All right, any other questions? Hi, thank you for the presentation. I'm just trying to get familiar with some of the concepts you introduced. For example, I wasn't aware of some of the components I saw in the least ETCD and I started wondering about data persistence and what is actually needed by port works to operate and what will happen if we lost, for example, ETCD? Good question. So the way it is in the universe, we made it very simple for somebody to just install and try out port works. For production though, we suggest that you install HCD independent of Mesos or DCOS because what will happen in that case is in case you're DCOS or in case you have to reinstall Mesos or DCOS, your port works installation will not be affected at all. So in this case, if you had to reinstall Mesos or DCOS, since HCD is using local volumes, you will not get back the same offers and you will not be able to bring back HCD with the same state. So in production, we actually suggest you have an external HCD apart from this. But the point over here is to demonstrate how easy it is and in case somebody just wants to try it out really quickly. And HCD is just used to store, actually just used to store the metadata for our control plane. There's no actual data stored over there. So it basically stores information on what volumes have been provisioned and all that such. And we are actually working on a way that in case you do lose your HCD, you will still be able to reconstruct HCD by looking at all the block devices that you have in your cluster and basically reconstruct that. So we are working towards having that. Hi, I saw you that you have to launch another framework, different from the methods framework in order to launch Cassandra. I assume with Powerbox. I assume it means the same with HDFS, isn't it? Yeah, so all these frameworks are based on DCOS Commons, which has a, so basically DCOS Commons has, is an SDK to launch and manage your stateful services. The only thing over there is that they had support for local route and mount disks. So we've only modified that framework to be able to support Portworx volumes. So, and we've just rebuilt the, we've changed the parameters that you pass into the YAML spec so that they can use the Portworx volumes. So it's basically one SDK and we've built these four services on top of that SDK. I think you answered my question, but all the functionality that has to this framework is still in your framework, isn't it? Like Kerberos for HDFS or TFS for Cassandra. Yes, all that support that's there in the base DCOS Commons is also in this. Yes. Okay, thanks. Any other questions? All right, so you can always visit us at our booth. If you have any more questions, you can always go to our website too. Like I mentioned, all our services are in the catalog. So you can always just search for Portworx and download and install them. You can also visit our docs website if you want to get started. We have a free PX developer version. We also have a PX enterprise version that's free, which has all the features in email and is free to try for three days. You can contact us at infoatportworx.com for more information. Thank you. Thank you.


or look at shooting with accuracy. Now obviously you should be trying to be accurate even if you're striking a ball with your laces, but personally for me, if I'm trying to pick a spot, I will usually use my instep or the inside of my foot. When I'm taking this shot, I'm trying to visualize the path the ball is going to take. So what I mean by that is if I'm trying to curl it around the keeper, I might start the ball outside of the net. I will send the better in one day soccer blueprint to anyone who comments hashtag soccer on this video and have it curl back at the last second. If you like this content, check out the soccer success planner. You can download it for free. There's a link in the description below and for advanced training, check out the online soccer academy.