Good morning cyber traders welcome back on this February 11th. How's everybody doing good to see you all Bonnie? Good to see you. Good to see you Bill Grant Rich everyone Lawrence Wayne everyone. All right. Well, listen guys Looks like we're having a nice little upmarket today, which is great and exciting again up 115 points but before we start talking about what's going on this morning because obviously everybody is Enjoying the new buyout that I I love buyouts. I love when you know, once again, I say it all the time I don't care about the CEOs.  It's the employees that help make it great that make those companies work Let's give them a whole round of applause Now before we get started guys, I'm just give you a heads up my buddy Tom Sosnoff is coming on today I hope every single one of you get registered. I got the link. I put it up there, you know, Tom I've been friends with Tom for Jesus. It's got to be maybe 15 years. He's the founder of Thinkorswim. He's a great entrepreneur Great platform. He's gonna talk about he's a talk about trading.  He's the great is great that he's a great options trader And we're gonna talk about talk to him about how we could day trade options We're gonna talk about what's happening with the options market and I know and can and how his platform works for all of us So it's a great platform. He's got a great package Great tool out there. So guys go out there register right now. He's coming on at 415 and I expect Every single one of you there. So please don't disappoint me. All right, because it's a value It's a class and you all should be there. All right, so you got the link register And I'll on a homepage or our website a lot. She can bring it up You go right to our homepage or our website You go to Cybertree University of C2.co and also on if you guys watch the new NASDAQ video, you know on YouTube So make sure that was a new the new YouTube one that I just did also But go out there and register. Alright, so let's talk about what's going on today, everybody And what happened yesterday because here's the big news. They have Sprint Sprint's gapping up really nicely Good for them stock has been on a on a really big downtrend, but obviously finally got approved So I don't know what happens. I don't know who you have but I have T-Mobile So I don't know if there's a good thing or a bad thing with Sprint, but I have to thank Sprint for one thing They gave me the best phone number ever All right, now I'm not gonna make my phone number public. Okay, my cell phone number, but I am gonna tell you this They gave me I'll tell you my for my last four digits of my cell phone 3000 and Every I had people ask me all time. Could you tell me a cell phone number? I want to buy that number 3000 how do you get a 3000 number? So I got it's the only thing I got to thank Sprint for all right other than that This service when I started was that great, but T-Mobile is awesome But anyway, I'm happy for them and great, but listen, it's moving. It's still moving higher I guess they didn't figure out the buyout price is how it's gonna work out But just be careful with these buyouts because they are pretty nuts All right with that and T-Mobile, but I do want to start off talking about some stocks that we traded and we did pretty well yesterday CODX Want to bring that up so anyways CODX was a great stock yesterday we made a lot of money with it and the stock basically had a nice little trend, but then all of a sudden a tanked, you know and All I could say about this stock. Let me just fix the chart on this one All I could say about this stock is we made a lot of money on this stock Thank God. I got out. Listen. I traded this stock yesterday probably Six times I probably traded it got in got out got in got out got in got out And I'm like and you know what Josh called out this stock He comes in my office right at the lunch it was Fausto you got to watch this CODX I think something's going on and it was right around here around 320 But personally I don't like to trade him all the day Because every winner that I would have most of them are losers But sure enough right at two o'clock boom I had that big spike one from 320 to 420 But once again, this is what happens when you know, you don't hold positions overnight because look where it ended up Right back to where it started. So anyway, that was a great winner for us We did that was actually my biggest winner yesterday So sorry if I was a little quiet going in the afternoon, but that's where I really made most of my money now This stock got halted Obviously news on IBM having his employees Go out there and you and work out of works But sure enough you could see what happened boom the thing just whatever I got halted and gap down So that's why don't ever you know, you know, and I know there's nothing worse than being in a stock That gets halted. The only time I feel a halted stocks ever work for us is when When the when the circuit breakers blow on it because it went up too fast But that's the only time I ever really kind of you know worked on that and other than other than those other stocks That we traded there were a couple of the ones out there, but I thought those are pretty the good ones right eight also Had a nice little move yesterday Bring up right eight and then you know that was in an early morning runner But that really wasn't this it was Monday. It wasn't a you know wasn't Spectacular nothing like to you know to brag about and you know that Tuesdays Wednesdays and Thursdays are the better days to trade and Yes, I do got a very decent list. So get your pen and paper rate at everyone. Let's start working our way down All right.  I talked about it yesterday I've owned it for a few years now for some of you missed it They've raised their dividend from eight and a half percent to nine and a half percent. That's 12 percent We killed it on CSQ great great swing trade. Hopefully everybody enjoyed it And especially hopefully a lot of you got into it when I bought it last year when we had the nice little Christmas crash which was really awesome right there that Christmas crash right there and Everybody should have to write around ten dollars or whatever, but that was probably that was probably my best Winner swing trade because it really was up about 50% and I get paid nine nine a half percent money on that awesome Well, I gotta love those stocks. Anyway, alright, so let's go through the watch list and see what's going on There are a couple of stocks. We know about Sprint. All right, so put Sprint on your watch list So Sprint we already know about let's talk about some other ones that are moving ADXS All right, so we had a nice little pop in that one, too Only thing I do not like about it. It is a penny stock, okay? And you know what you know about penny stocks. How why would you stay away from him? But I know I had a little bit of pop early this morning. Some of you guys did pretty well on it So that one was not bad g and px That one also nice little cheap little stock started a buck 25. It is a Nasdaq national stock stock went to a buck 60 We've traded the stock Back in December. I mean in January stock went from a dollar two dollars got good volatility If you've done your journals Go back and check on it and see how you did on it, right? But if you remember we did really really well on that stock SAVA So this one, I know what happened with this one. This one had a great move I thought it was gonna be pretty good in pre-market. You could see how it had a really nice move here. Hold on Right here had a nice pop. I don't know what happened. So all of a sudden it kind of backed off So now I'm a little skeptical on it, but it did trade a lot of shares 300,000 shares It's got a nice little iceberg order right here at 850 for a quote from a 9700 shares Kind of explains it wide-splot. It's having a tough time right there right around nine o'clock Okay, so let's talk about some brand name stocks under armor who would ever think under armor, right? You hear all the good news Nike breaking higher highs. What's going on under armor crying out loud under armor taking a huge hit The only thing I like about under armor though. It's testing September's I mean November's support levels, so it could build it could have some good support levels now There are two stocks in under armor This is like there's a warrant which you could see a class a share here and you got UA All right to see share so they there's two different classes of shares out there and you know Obviously, I'm not gonna teach you about you know voting rights and non voting rights of stock prices But anyway, one moves the other one moves Simon simultaneously with it now on A couple of stocks. I just want you to keep an eye on everybody remember about M. Y. Oh We killed it on M. Y. Oh, remember that stock 10. That was like literally four days ago $10 to $40 right people like not so funny. I get message from people like well Why is it down to 640 Fausto? Listen, you think I care why it's at 640 You should have talked to me three days ago, but Stocks coming to reality. This has to be one of the greatest short squeezes of 2000 in 2020 I thought it was Tesla now this one desk definitely is by the way keep an eye on that Tesla I was listening. I was looking at some reports reading overnight. There's some people have some big issues with that stock There's a huge short squeeze on that stock, especially now. They have rumor that there's a rumor going around That Google might buy him because they have all the money in the world Consider paying $1,500 for that stock. So pretty scary right there. Anyway, NYCO was a great short squeeze We killed it on that one and I also want to bring up the AO Another one that Had a huge run up, but now it's coming back down So we watched this stock go from 16 to 30 literally going up a hundred percent now She's backing off. So just be very careful the only issue I had with this stock right here I know some of you trade it. It is a level five stock which some of you really are not and Had a good hat, you know, and obviously this is something we're gonna be talking in class today because remember class of start today here at Cybertrain University and It's all about tradable and non-tradable guys. Remember that the most expensive party you trade is Buying is getting out of the stock. That's the most expensive part of trade because if you're wrong It's not about the it's not about the ticket price. It's not about the ECN cost It's all about the spread. Okay, so be very careful about the stock right here. All right. What do we got going on over here? Veneto is looking at the ONT X trade they did pretty well on that one Yeah, I know it's the only issue. It's a penny stock right there, but it did pretty well on that one and And also the S which we all know is doing pretty well. So anyway, I like that S trade I like that sprint trade. It's a you know, it's not like Listen started this morning. We're from eight dollars for everybody got in at eight o'clock and look It's already at 850. So you it's always nice to start out the morning with a nice little push All right, so those are our watch list is guys not a big list not a big list but what it is what it is and You know, we got what we have so we always find new ones that do pop up So when you see something say something and hopefully all you new traders here and listeners that are watching this on our Broadcasting alive on YouTube and and Facebook Listen, if you want to know more about Cybertree University, just sign up and you'll get in the trading room You'll see how we do it. All right, and then like I told you don't forget everybody Tom Sosnoff tonight Well this afternoon when the market closed at 415 once he's done with his show He's jumping on here at Cybertree University and he's gonna talk about all the great things And believe me. I had some great great questions to ask him. So don't miss it So I expect every single one of you to register Right now. All right before class starts for the market opens up because you know nothing's gonna happen in next 15 minutes All right, any questions everyone anything else got the link right there. There you go. All right, so Remember classes start right after this traders talk starts at 12 o'clock afternoon classes are gonna start and You have the Tom Sosno. Remember, it's a really busy busy day. You do not go anywhere This is what we do on Tuesdays where this is home day So it's time to put your head down and remember make your money early get into class afterwards and Because that's how you're supposed to do it right guys. Good luck everyone happy trading and we'll be starting live commentary In the cybergroup room in 15 minutes when a market opens up. All right meantime get your registration done The old class everybody good luck and happy trading


.We are talking about jet engines and how the jet engine thrust is created. Now, jet engine as we know is normally used for creation of thrust for flying of aircraft. For different kinds of aircraft, different ways of creation of thrust is often required. And in today's lecture, we will have a look at how these different kinds of thrust are created by slightly different variants of jet engine. And we will have a look at how these thrusts are actually measured or quantified. Now, jet engine thrust is often a result of change of momentum as we have seen due to the Newton's laws of motion, more specifically the third law. Now, that is a very summary way of understanding and putting how the thrust is actually created. The actual creation of thrust is often a little more involved and jet engine is a composition of machines. It itself is a machine on its own. It is a mechanical machine. It is a thermodynamic machine. It is an aerodynamic machine. And we will look at all three aspects of this machinery in the course of this lecture series. In today's class, we will take a look at basically its mechanical composition and how mechanically it creates thrust. Later on in the course of this lecture series, we will be looking at them from thermodynamic point of view. And later on we will be looking at them from aerodynamic point of view. In so far as the components are all as I said thermodynamic entities as well as aerodynamic machines. Let us take a look at how fundamentally the jet engine thrusts are indeed created. If you take a jet propulsion device and look at its fundamental thrust creating capability, your understanding is that a certain amount of flow goes into the propulsion device. Let us say with the velocity V a coming from the atmosphere. And we have discussed that basically the jet propulsion device uses the atmospheric air to do the work and create thrust. And through the propulsion device this air is accelerated and is exhausted with a velocity V e and may be a pressure P e which could be slightly different from atmospheric or ambient pressure P a. And if that is the case, if that is what we can accomplish, then we can get a net thrust which we can write down simply as F subscript n equal to m dot into V e. Now that is the gross momentum thrust that you get from the exhaust of the engine as a reaction to the jet exhaust. Now this is what you get as far Newton's third law. So the first term is essentially a direct result of the Newton's third law. The second term which is a negative term is m dot V a. Now m dot of course is the mass flow through the engine and that is the amount of air that is going inside the device and same amount of mass flow is coming out at the exit from the device. So we assume for the time being that the entry mass flow and the exhaust mass flow are equal and same. We shall see later on that they may not be exactly same, they may be slightly different. But we will come to that later on in the course of this lecture series. Right now let us say that two mass flows are the same. So the second term is m dot into V a. Now this is the momentum with which the flow is going in and it is hitting the intake or inlet of the jet propulsion device. So this is quite often referred to as intake ram drag because that is a momentum with which the air mass actually hits the propulsion device at the entry phase and it is then taken as a drag created by the incoming air.  Now this differential pressure as we can see creates the third term and in the event when P e is exactly equal to P a and that is indeed quite possible, the third term would be 0 which means there would be no pressure thrust and we will have only momentum thrust that means we will have only two terms. The gross momentum thrust due to the Newton's third law is a reaction to the exhaust jet and the intake ram drag which is due to the intake of the flow coming into the propulsion device. So these are the fundamental features of creation of thrust and the composition of all three together is often referred to as net thrust and for the moment we will write it simply as f n. We will continue to probably refer to thrust in terms of f as we go along in this lecture series. Now this creation of thrust as captured in this equation is a summary way of figuring out what the thrust could possibly be and a reasonably accurate estimation of the thrust and this thrust relation is what we call of a general nature. Normally valid as I mentioned when there is a residual exit static pressure which as I mentioned sometimes may not be there which means the P e could be equal to P a in which case the third term would be 0 and as a result of which if the third term is 0 the net thrust would be simply m dot into V e minus V a that is the velocity change across the propulsion device assuming for the moment that the mass flow that is going in is the same mass flow that is going out of the propulsion device. So this is a simple straight forward momentum thrust created by the propulsion device. Corresponding thrust can be also shown in terms of thrust power and that is simply written as T H P is equal to f n into the velocity with which the aircraft is moving. Now that is the velocity with which the whole engine and the aircraft together are moving and that is the power that is being created by this propulsion device based on the thrust that is created by itself. Now the basic thrust equation that we have indicates that as the forward speed V a increases it is necessary to increase either the mass flow or the exit velocity or both in order to hold the thrust constant. Now let us look at the equation again. You have the mass flow as the contributing parameter to the thrust, you have the change of velocity as the contributing parameter to the thrust. If for example the aircraft starts flying at a higher velocity that is V a in which case the thrust is going to go down unless V e increases or unless m dot increases. So which means you have to find ways and means of increasing either V e or increasing m dot to hold on to your thrust value otherwise your thrust is going to start going down. Now this is a pretty much a known phenomenon and a known problem as comes out from the simple momentum equation and in case of certain kinds of jet engine as we shall see later on as we go along. For example, scram jet engines for hypersonic aircraft the value of the difference between V a and V a could be so small that under certain operating conditions it is indeed possible that V a actually would be higher than V e which means the thrust creation would be negative. Now that is a realistic possibility under certain operating conditions of certain kinds of jet engines for example, scram jets. So it is a realistic situation which comes out of the simple momentum equation that you have to keep an eye on the three parameters primarily the mass flow, the entry velocity V a which is dependent on the aircraft flight velocity and the exit velocity V e which is indeed what is created by the propulsion device. So propulsion device need to be tuned to create a certain amount of thrust as required and these are the three parameters one is need to keep aware of during the entire flight during the entire flight process all the three parameters need to be kept an eye on or to be under control. Now many of the jet engines are designed to create near constant thrust characteristic often referred to as flat rated characteristics at any particular altitude which means at a particular altitude if the aircraft is flying the thrust created would be more or less constant and in which case various aircraft manoeuvres can then be created or then can be designed for the aircraft knowing that the propulsion device is going to give us almost continuous constant thrust during the flight at that particular altitude. So quite often engines are designed to create near constant thrust characteristics at any altitude now of course as we have seen from the THP definition that if the thrust is held constant and if a flight velocity is indeed increased flight speed is increased the thrust power is not good now going to go up. So it will result in higher and higher thrust power with the forward speed now this characteristic of turbojet engine is quite often available at high subsonic speed ranges and with a properly designed inlet diffuser extends well into the supersonic range. Now we will be talking about the thermodynamics and aerodynamics of supersonic engines which are meant for supersonic aircraft. So when an aircraft is flying supersonic the intakes need to be designed accordingly and some of those things we will be discussing later on in the course of this lecture but at this moment let us just try to understand that under certain operating flight conditions the engine operating condition needs to be matched in such a manner that the thrust creation is in tune with the requirement of the flight of the aircraft and one of the simple ways of creating thrust is to create a constant or near constant thrust at any given altitude. In the supersonic region quite often the jet engines are equipped with afterburners now these afterburners straight away give you more thrust and now as we see as we have just seen if the velocity of the aircraft actually is increased that is V a is increased you need to increase V e the exhaust velocity and afterburner is one simple straight forward way of increasing V e and this is possible when the Mach number is increased from 0 to up to about Mach 3 and at such high flight speeds that is Mach 1 and above that is supersonic Mach numbers. An appreciable proportion of the air compression is accomplished in the inlet diffuser and we shall see later on that inlet is an aerodynamic entity it is an aerodynamic component which essentially converts kinetic energy to pressure and at very high supersonic Mach number if this can be done efficiently how it can be done efficiently we will discuss later on in this course. But if it can be done efficiently then you can create sufficient amount of pressure and this pressure then can be utilized later on in the nozzle to create a high velocity jet. So, to create a high velocity jet you need a certain amount of residual pressure going into the nozzle and some of this pressurization can indeed be done right in the intake system itself as and when the air is coming into the propulsion device. In fact at Mach number well above 3 due to the very high kinetic energy conversion often referred to simply as ram effect it is quite possible to even dispense with the compressors of a typical jet engine and hence also the turbine. Now some of these things we will be discussing in more detail as I mentioned both as thermodynamic engines as well as later on as aerodynamic machines and these machines are or jet engines are simply called ramjet engines and as I mentioned we shall be discussing ramjet engines and its variants later on both as thermodynamic entities in terms of their thermodynamic cycle analysis and also later on as aerodynamic or gas dynamic machines. Let us take a look at simple thrust variation characteristics of a simple jet engine that we looked at at let us say a constant air mass flow. Supposing the air mass flow through the engine is held constant let us say by some design of the intake. So, at a particular altitude in this case we are looking at a flight at an altitude of 9 kilometers which is quite often a normal altitude at which many of the jet engines actually fly with their craft and if the constant air mass flow is held constant the pressure thrust as we looked at is likely to be constant. There is no reason why it should change with the flight speed the momentum thrust versus the flight speed tells us that it is likely to be constant. The ram drag as we saw the first second term that is due to the air intake keeps going up if the air mass flow is constant as the flight speed is going up V a is going up m dot is constant. So, m dot into V a is going to go on increasing with the flight speed and the gross thrust that is the first term is held constant that is V e is constant m dot is constant. So, there is no reason why the first term that is the gross thrust due to the Newton's third law should change. So, this is how the three component that we looked at actually would behave if the air mass flow is held constant, but holding the air mass flow constant requires a certain amount of design of the intake system which is often not quite a done thing. So, quite often what is a done thing is the air mass flow actually varies with the flight speed and if it does vary let us look at how the various components would vary the pressure thrust would actually again be held constant there is no reason why that should vary. However, now the momentum thrust would increase with the flight speed because the ram drag now has a non-linear characteristic it varies non-linearly with the change of air mass flow and with the change of flight speed as both the components are now changing. The gross thrust now would also vary because air mass flow is now varying. So, the first component would also increase with the flight speed. So, as we can see depending on how the air mass flow is controlled through the intake system the thrust characteristic of the engine would actually vary. In fact, in some of the cases some of the jet engines it may be possible to have variable geometry intake system by which the air mass flow can be metered or varied. However, the more used method of varying the air mass flow of course, is using the variable geometry exhaust nozzle and almost all the jet engines that are flying today do have variable geometry exhaust nozzle through which the air mass flow can be metered or controlled in a flying engine. Let us now take a look at some of the other parameters that affect or influence the behavior of typical jet engines. Now, the propulsive efficiency which is often a term that can be defined as a ratio of the useful propulsive energy or thrust power which we just had a look at and that as a ratio of the energy and the unused kinetic energy of the jet. Now, the energy that is available for creation of thrust power that is the energy that is indeed created into thrust power and the unused kinetic energy of the jet the sum of the two actually is the energy that is available for propulsive purposes. Now, the kinetic energy that is going out relative to the earth may be written as m dot into V e minus V a whole thing to the power square to the power 2 divided by 2. Now, this is the kinetic energy with which the energy is released from the propulsive device and this kinetic energy goes out of the propulsive device and has is of no use to us anymore once the thrust has been generated. So, it is called unused kinetic energy of the jet and hence one can say that this is a waste energy it goes out of the energy of the engine body. Now, this is something which we will be concerned with and we will be talking about it in terms of engine performance in terms of cycle performance and later on in terms of nozzle performance in different ways and there are many facets of looking at some of these parameters and we will be looking at these parameters in various ways in the course of this lecture series. Now, let us remember that the inlet diffuser with which through which the flow is coming in it provides a aerodynamic pre compression as we have discussed just a little earlier and it also produces the ram drag as we have seen. So, the diffuser that we had a look at had both utility value in terms of producing a certain amount of compression it also produces a negative aspect that is what we call the ram drag. So, the jet exhaust has a certain positive thing that it produces a reaction thrust it also produces an unused kinetic energy of the exhaust jet. The intake similarly produces a pre compression of the air, but it also produces certain amount of ram drag which is a negative component as far as the thrust preation is concerned. Now, we can look at what the propulsive efficiency of this propulsion device could be written down as and as we have written just talked about in terms of words we can write it in the form of equation now. The numerator indeed is the thrust that is being created thrust power that is being created that is thrust into the velocity with which the aircraft engine combined is moving in air. So, that is a relative velocity between the aircraft engine and the air the atmospheric air which let us say for the time being is still air and the denominator is that thrust power plus the kinetic energy which we just mentioned which is going out as waste. Now, if you write that down as defined in the last slide it all boils down to a very simple relation that is 2 divided by 1 plus V e by V a. Now, this relation is also known as Froude's efficiency, technically it is the propulsive efficiency of the propulsive device it is developed by a gentleman called Froude little more than 100 years back and it is often also referred to as Froude's efficiency. What we can see from this relation and this is something we will be talking about it more and more as we go into various variants of jet engine and this has to be looked into in in many different ways and we shall be doing it over the course of the lectures. But let us take a quick look at what it means simply very simply it is it is evident that the net thrust is maximum when V a is 0 that means their craft is actually on the take off just before the take off it is it is static and it is not moving it is on the top of the take off run and V a is 0 and that is when the f n is going to be maximum the thrust is maximum. But if you look at the propulsive efficiency now your propulsive efficiency is 0 according to this theory that we are looking at. On the other hand propulsive efficiency is maximum when the ratio V e by V a is equal to 1. So, this theory tells us that if V e by V a is equal to 1 propulsive efficiency is maximum that is 100 percent. But that is the point when the thrust is going to be 0 because thrust is simply equal to V e minus V a and the thrust is going to be 0. So, we have to absolutely opposite contradictory situations that means when the thrust is maximum theoretically the propulsive efficiency is 0 and when the propulsive efficiency is possibly maximum the thrust is going to be 0. So, it is obvious that these theoretical possibilities are the two extremes some of which may not actually happen. But the engine would have to operate between these two extremes and somehow we have to configure our engine to keep this in mind that when the two velocities keep changing from certain value to V e by V a equal to 1 or a certain value in which V a is indeed 0 the propulsive efficiency and the thrust creation pull the whole propulsive device in two opposite direction. So, we have to just simply keep it in mind that theory tells us certain contradictory situation can arise under two different or two opposite operating conditions this is of course, what the theory tells us. The propulsive efficiency as we know is a measure of how well the propulsive device is being used the propulsive efficiency that we are looking at that we have just defined is actually comparable let us say to a propeller efficiency where propeller is the propulsive device and when we have a propeller driven engine the propulsive efficiency of a typical jet engine would be comparable to the propeller efficiency of the propeller driven engine or propeller driven thrust making device. So, when we compare the propulsive efficiency of a typical jet engine on that of a typical propeller driven thrust device we are comparing the jet propulsive efficiency with the propulsive efficiency of the propeller. And we have to remember that the efficiency as we have defined now as a propulsive efficiency is different from other efficiencies that we will be defining in the course of this lecture series and it is different to begin with from the energy conversion efficiency. There are many efficiencies that would be coming up in the course of thermodynamics their efficiencies like thermal efficiency, but at the moment let us look at what is simply often known as efficiency of energy conversion. This is simply a ratio of the energy that is put in by burning the fuel and the energy that is created for creation of thrust. Now, energy that is created for creation of thrust as we have just seen not whole of it is utilized by the engine for thrust creation only part of it is utilized. So, this is now a efficiency of energy conversion where we are just looking at how much of the fuel mass burnt energy is available for energy in terms of available for thrust creation. So, the numerator here is m dot into V e square minus V a square divided by 2 that is the energy that is available for thrust creation and the denominator is the energy that has been simply made available by burning of the fuel are released by the chemical energy that is released by burning of the fuel. The denominator is dependent on the mass flow of the fuel and the heating value of the fuel. So, you have to choose your fuel properly. So, that it has highest possible heating value without creating any other problems and the fuel mass flow of course, gives you the amount of energy that can be released. As we go along we shall see later on that if you simply put in more fuel you can get more and more energy available and hence more and more energy can be made available for thrust creation, but you are burning more fuel. So, that may not be the most fuel efficient way of getting more thrust. So, this simply tells us that if you burn more fuel you can indeed get more available energy for thrust creation. How you create the thrust that is a second matter that is another matter, but if you burn more fuel you can get more energy for thrust creation and this is indeed what is quite often done. For example, if you have a reheat engine or after burning engine in which simply more fuel is pumped in and that more fuel simply gives us more energy for creation of thrust. How that is utilized efficiently we shall see later on as we go along in this lecture series. So, the overall energy efficiency is quite often simply written down in terms of the thrust power that is created and the fuel energy that has been released by burning of the fuel. So, that is the overall engine efficiency the efficiency of thrust creation as opposed to the energy available from the fuel burning and this simply comes out to be a product of the propulsive efficiency and the energy efficiency we just saw in the last two slides. So, the two earlier energy efficiencies propulsive efficiency and the energy efficiency are together responsible for creating the overall engine efficiency and hence we need to keep an eye on the propulsive efficiency and the energy efficiency both of them and over the course of these lecture series we shall see how these two parameters are maximized to get higher and higher overall engine efficiency. There are methods both thermodynamic and aerodynamic by which these two parameters can be improved or maximized under various operating conditions of the engine to get better and better overall engine efficiency and that is what we will be discussing over the course of this lecture. Now, we know that jet engines are used not only for flying aircraft in subsonic speeds today many of the aircraft more specifically the military aircraft do fly at supersonic speeds. Now, at supersonic speeds the incoming velocity is now supersonic VA is now very high and hence as we have discussed before the dram drag is also going to be very high. Now, it stands to reason that if you have very high intake velocity you would need to create high exit velocity something we have just touched upon a little earlier. So, if you are flying at supersonic speeds your entry velocity is high your exit velocity will also have to be high and your ram drag is high. So, to overcome that ram drag you need to create more and more thrust. So, the first thing is you need to create a air intake to take in the supersonic air that is coming in efficiently. So, that your pre compression that we talked about is done more and more efficiently. So, the ram drag the penalty that you are paying for is suitably compensated by an efficient pre compression. If you can create efficient pre compression later on it is very useful for you to create higher exhaust velocity. So, you need to create a very good intake system to create a very good pre compression and we shall be discussing various aspects of intakes later on in the course of this lecture series. Now, if you can do that if you can do that what it says is that you can then afford to have an after burner. Now, that means that you would need to create an intake system in which the engine which operates under various operating conditions under various mass flows as we have seen the mass flow through the engine can be varied and intake is one of the parameters one of the components through which the mass flow can be metered the more active component being the nozzle of course and if you do that then you need to continuously match the intake performance with the engine and the aircraft combined and this is something that needs to be done on a continuous basis during the entire flight of the aircraft and at hypersonic speeds you have intake requirement that is of a even greater challenge and you need to create thrust generation at hypersonic speeds where the intake velocity is of very high and you need to create exhaust velocity which is even higher and there are no rotating components. Now, this is of course a challenge which we shall be discussing in great detail as I mentioned both thermodynamically as well as aerodynamically or gas dynamically as we go along over this course. Now, the fuel consumption for turbojet and other jet engines is normally presented in terms of what is known as specific fuel consumption or more specifically for jet engines thrust specific fuel consumption. Now, we shall see as we go along that the thrust specific fuel consumption is actually a more utilized parameter or figure of merit for the efficiency of the engine. The efficiency parameters that we have defined are indeed used by the designers or theoreticians or for calculation purposes, but for operational purposes for operators the more useful parameter is the specific fuel consumption or thrust specific fuel consumption which directly keeps an eye on the fuel consumption of the engine during the various phases of the flight of the aircraft engine. Now, thrust specific fuel consumption varies with the engine rpm. Now, we have rotating components as we have seen compressor turbines and the engine aircraft combined flies at various Mach numbers at various altitudes and quite often at its flight altitude somewhere near very high altitude it is generally operating at somewhere around 80 to 90 percent of its maximum or rated rpm. So, all those parameters are varying and you have to keep an eye on the thrust specific fuel consumption or TSFC. Now, when you have a reheat or after burning as we keep talking about and we shall see that you simply burn more fuel and obviously the SFC goes up. So, what it shows is that if you simply pump in more fuel you get more thrust you are getting more thrust at the expense of burning more fuel. So, that it will show up in SFC you will get more thrust you will have more fuel burning and SFC is indeed going to go up. So, what you are doing is you desperately need thrust you burn more fuel you sacrifice SFC which is as I said a measure of fuel efficiency of the engine you sacrifice for that for the time being just to get some more thrust which you need desperately for flight requirement of the aircraft. So, that is one way of getting more thrust simply by increasing the SFC. Now, the turbo props have quite often the lower SFC as we have mentioned before the propellers are indeed the more efficient flying device and they often have lower SFCs and this is the one of the reason this is one of the main reasons because of which propellers are now being reconfigured in the form of prop fans for creating newer breed of jet engines and we will be looking into them later on which have higher SFC. So, SFC is a figure of merit a very important parameter that is driving the development of new varieties of jet engines and it has been driving the development of jet engines over the last 30 40 years of the development of various kinds of jet engines. Simply put the specific fuel consumption is defined in terms of the simply the mass flow that is of the fuel the fuel that is actually put into the engine divided by the net thrust. So, that is simply the SFC and it is often expressed in terms of in SI system it is expressed in terms of kilograms per Newton hour or milligrams per Newton second to conform to certain good looking numbers. Now, the actual computation of fuel mass flow and indeed SFC and of course net thrust would vary from one kind of jet engine to another and that we will be discussing later on in the next few lectures through your cycle analysis through your thermodynamic performances. We shall see how these parameters are indeed quantified for various of jet engine. Let us take a quick look at how jet engines fare in comparison to other kinds of aircraft propulsive devices. Now, if you look at this you will see that as we mentioned earlier jet engines by design quite often have what can be called a rather flat operating characteristic. Whereas, typically the propeller driven engines or propulsive devices have the thrust that keep going down with flight Mach number and one of the reasons is that the propeller efficiency starts going down and hence the thrust created by it also goes down and then there is a certain flight Mach number at which typically the jet engines start becoming more and more profitable for flight of aircraft. So, there is a flight Mach number below which it might be profitable to use propeller driven engines, but beyond that flight Mach number it may be profitable to look at various variants of turbo jet engines or jet engines for powering aircraft flight. If we look at the propulsive efficiency which we have defined earlier we shall see that the three variants that we looked at also have three different kinds of characteristics. The turboprop engines as we see reach a peak of a propulsive efficiency and then it starts falling off the modern prop fans which I just mentioned gives it a new lease of life so to say and extends its capability to higher flight Mach numbers. On the other hand the turbo jets and the turbo fans have increasing propulsive efficiency with Mach number flight Mach number and a certain flight Mach number they overtake the propeller driven engines and as I mentioned they become more and more profitable and that profit actually shows up in the form of SFC. The turbofan engines also have a certain characteristics and even they take over from the prop fans at certain higher flight Mach number at which then the prop fans would probably need to give away to pure turbo fans. So, these are some of the simple guidelines which are available. We look into the details of some of these things and quantify these numbers as we go along with various variants of jet engine. Now since exhaust velocity V e is considerably higher than the incoming velocity V a and this is true mainly at low flying speeds the efficiency is much lower than that attainable with the propeller. Now, this is the reason that V e is since it is considerably higher than V a it entails that is a huge lot of waste energy that is going out and as a result of which the propulsive efficiency is low. When the aircraft flies at a higher speed the difference between V e and V a is considerably less theoretically as we have seen it is highest when V e is indeed equal to V a, but we always need to keep a positive value there and hence with the increasing mass flow they start giving reasonable amount of thrust for flying aircraft and that is when the efficiency becomes higher than that of a propeller. The other thing that happens is the propeller efficiency starts dropping somewhere around Mach 0.5 by Mach 0.7 they become really uncompetitive because somewhere over the propeller the aerodynamics of the flow over the propeller goes supersonic and the propellers start becoming less and less efficient and that is where the jet engine propulsive efficiency takes over from the propeller driven propulsive devices. All this tells us that the overall efficiency of a turbojet firstly it is lower, but the Mach number at which the overall efficiency of a turbojet equals that of a overall efficiency of a turbo prop or a prop jet is normally more than the Mach number at which their propulsive efficiencies are equal. So, as we have seen the propulsive efficiency is different from overall efficiency. So, the Mach number at which the two are equal that is the jet engine or propeller engine is different from propulsive efficiency point of view compared to that of overall efficiency point of view. So, it will vary from one kind of engine to another and exact values would need to be computed to find out where they become more and more profitable. Let us take a look at the overall thrust characteristics of a typical jet engine and as we see here the thrust characteristics have been computed typically for at various altitudes starting with sea level than 2 kilometers and going all the way up to 10 kilometers which is often a good cruise altitude for many of the aircraft that are flying around. What we see here the y axis is the thrust ratio between the instantaneous thrust and the take off thrust which is as I mentioned earlier quite often the maximum thrust and this is the thrust with which their craft engine takes off and then it flies at sea level and at a certain point of time it starts climbing to higher altitude and finally reaches the cruise altitude where it cruises to long distance and that is when the Mach number is also supposedly the cruise Mach number whatever the aircraft is designed for. Now this is what we see here is that the thrust characteristics at any altitude is more or less flat at lower altitude the thrust slightly decreases with the increasing flight Mach number and that is due to the ram drag at very high altitudes the ram drag is less because at high altitude your air density is much lower and so with flight Mach number the thrust characteristics actually shows a slight upward trend rather than a downward trend as we see in the lower altitudes. However at all altitudes they are nearly constant and this is what we had discussed today earlier on. If you look at the SFC characteristic specific fuel consumption at sea level they keep on increasing at all altitudes indeed they keep on increasing but at higher altitudes as we can see the SFC is lower even if they are increasing what is interesting is that the actual value of SFC as we see at take off and as we see at cruise may be more or less equal it may be possible to design an engine where the cruise SFC is actually slightly lower than take off or it is possible that the cruise SFC is of the same order or in fact slightly higher than the take off SFC. So, these are the SFC characteristics of jet engines typical jet engine at various altitudes with varying flight Mach number. Now many of these engines as I have been mentioning are designed to operate under certain operating conditions a particular point at which the engine is designed or all components of the engine are designed is referred to as the design point and this design operating point or engine operating point is normally very close to the maximum thrust requirement which is quite often the take off operating point of the aircraft. Now this is the design point at which the rotating components and the non-rotating components are geometrically sized and shaped once they are sized and shaped that shape is what it exists with. So, this is what it is designed for most engines meant for transport our passenger or design very close to the take off many of the military aircraft on the other hand are designed to meet the thrust at supersonic flight condition that means an aircraft engine typically designed for supersonic flight it is likely to have its design point at a supersonic flight condition. So, the design point of an engine needs to be fixed a priori before the engine is designed which means the engine designer needs to know where this engine is going to be used whether it is going to be used for a passenger aircraft or it is going to be used for a military aircraft and of what kind only then the engine design can be proceeded with and that stands to reason that all other operating conditions of the engine along with the aircraft are known as off design operating conditions or off design operating points and at all these operating points the engine must work together in a matched manner. That means all components of the engine must work in a matched manner as an unit to produce thrust that is required by the aircraft and it is necessary then that the aircraft on which it is mounted must also conform to this thrust envelope. The thrust characteristic that we just had a look at we will have a quick look at this thrust characteristic is what is created by the engine or the engine designer it stands to reason that the entire aircraft should also operate within this thrust envelope. So, the aircraft operating envelope must fall within this thrust envelope of the engine and this thrust envelope includes all the operating points which indeed are the design point. So, this takeoff point is the design point of the engine all other operating points including the cruise operating point is off design operating points of the engine. So, let us try to understand that all engines are designed to operate over a large number of off design operating points and we have to make sure they operate efficiently at all these off design operating points. So, in this class we have just had a look at various kinds of parameters that define an engine and helps us creating an engine to meet the requirements of an aircraft flight. In the next class we will look at various variants of turbojet engine with and without preheat we will also look at jet engines which are single spool and multi spool these are mechanical variations and we will take a look at what this mechanical variations really mean and to what extent these are designed to meet the requirements of various kinds of aircraft.


I'm Matthew Coker. I'm a software developer at Pivotal Labs in San Francisco. I do some DevOps stuff, but I don't consider myself an ops person. I'm just a software developer who happens to know something about keeping a site running. And so my goal today was sort of to share with you sort of how I approach ops as a problem and give you some tools to sort of learn how to run your own website. How many of you take care of operations for the sites that you're building? Some? Many? Cool. Great. I wanted to start out by telling you a story. And I hope you can see this. It's certainly not big enough. But let me see if this works. It does not. If I zoom, OK. This is a graph of traffic to an API on Thanksgiving 2010, I believe. We had, I was, let's see, where were we? We had load tested to about the halfway point on this marker, around 6,000 requests per minute. This is a graph of the request per minute coming in, blew as good, 200 response codes, anything else is bad. And so we had load tested. We were ready. This was a day we'd planned for for months. And everything was looking perfectly. You can see this graph looks like every other graph should look. It's going up and to the right. That's how a graph should be. What happened next was a little unfortunate. And this, you can see, is our throughput decreasing dramatically as our upstream load balancer is noticing the 500 errors that we're giving. And it's cutting us out of the loop entirely. What had actually happened was the site that was hitting this API had rolled out a change that had put the API two clicks down instead of four clicks down in the site map. And they'd also started using JSONP requests. Well, they'd been using JSONP requests, but they had expanded their use of JSONP requests dramatically for this current sale on Thanksgiving. And JSONP requests always have a callback, which means they're a little bit difficult to cache. So we had performed well past any load testing we'd done, but unfortunately, this was sad times for us. What happened was about a minute after the site started bouncing, everybody involved got a text message. We all assembled in our chat room and started investigating what the problem was. Various people sort of coordinated what they would look into, what they'd look at. And quite frankly, a little bit too long afterwards, we managed to stabilize the site, which was great. This graph is once again looking good. It's not nearly looking as good as the last graph, the first portion of this graph, but it's decent. It's stabilized. We're serving the load. And now what I'm going to show you is the miracle of how we did this, which, luckily, we'd seen contact before, and we knew that why build one when you can build two for twice the price? So we actually built three, but we were only using two for this load. So this whole cluster of machines had been sitting there doing nothing. Generally, we would do AB blue-green deployments between the two of them, but in this case, we had it ready sitting there ready to serve the load. When we saw that the site had gone down, we cut it in, which was one cap task to touch a file on it, to have the load balancer put them in. And you can actually see what's sort of interesting on this graph is you can see the green, which are 500 errors in the beginning. And that is MySQL's memory cache getting filled up. It can't actually deal with the load until it's actually filled its caches up. It's a little unfortunate. Usually, we'd cut over slowly, but in this case, the site was down, so it wasn't a big deal. But you can see that after this point, the site came back up. We were still serving far more load than we had been serving before, and it was great. We actually cut in our third environment. And you can see about four hours later, we managed to get the site to push a code change that stopped abusing the API. Luckily, we were able to respond much quicker than the people developing the code on the front end of the site, which then had to push their JavaScript out through Akamai to actually get a change.  So this is just a story of sort of what it's like to be both a developer and the operations person on a project. You get to do the fun part of writing the code, and you get to do the fun part of waking up at 6 AM on the most important day of the year when the site goes down. While you're at your parent's house, because it's Thanksgiving. And of course, that's where you are on Thanksgiving. So we learned a couple of things from this, and we always try and learn things, hopefully. We learned that our planning will be wrong. We'd spent far too much money on load testing. The load testing had been created from on high, what it would be. It was a big name company that does load testing as their thing. And they had frankly missed that the site was going to be redesigned at the same time as the traffic was going to increase to it. We learned that our response is really what was important. So when this happened, we could actually look at it, evaluate what the problem was, and respond to it quickly. And knowing that JSONP requests weren't cached was useful, and wasn't something that someone who had just stood up servers would have really known. But because we had developed the code, we'd looked at the caching strategies, we realized that this was certainly going to be a problem. And we learned that more capacity is always a good thing. Over-provisioning is much cheaper than having downtime, the vast majority of the time. So what this brings us to is the first sort of main topic, which is availability. Or as I like to say, we are the 99.999%. Availability is when your site is available. It's not that hard to measure, so a lot of people measure it. It's extremely public when you are not available. So everybody in the company knows when the site's down. What people don't tend to realize is that each one of those nines costs a whole lot of money. If you were hosted in US East last year, you only had three nines because it was down for half a day. If you wanted to be, if you were in both of those data centers, maybe you got higher than three nines, maybe you didn't. But each one of those incremental nines costs a lot of money. And you can't guarantee that you're going to hit those metrics. You can only ensure as much as you can against them. But what you really need to do is have a conversation with all the stakeholders about what downtime will mean and what your response is going to be to it and how much they're actually willing to spend. The next problem that ops is once you've tackled availability, the next problem you have is consistency, which is keeping the site in a consistent manner, keeping your databases up, keeping your data clean. Henry David Thoreau said a foolish consistency is the hobgoblin of a feeble mind. But frankly, customers tend to like their data to be kept in a consistent manner. So once you have the site up, you have to make sure that the database is replicating properly, make sure that everything is reflecting the current state of the world. The challenge with this is that you're going to have network outages. We already mentioned this, I think, earlier today or yesterday, earlier this morning, actually, that network outages are a fact of life. As soon as you split services out over a network, they will become unavailable to something that's looking for them. So in summary, we have to zoom again. What this brings us to is the CAP theorem, which any of you who have chosen a NoSQL data store have probably looked into a bit. What the CAP theorem states is that you can have two of consistency, availability, and partition tolerance. And what I tend to say is that this means that ops is an impossible problem, because every person wants all three of those things. They want consistency. They want availability, and the network is going to partition. I'm sorry. And they probably aren't ready to deal with it. So when you go into operations, you have to look at those three things and evaluate what trade-offs you're willing to make, because it's proven that you have to make these trade-offs. And operations people are generally tasked with making sure nobody has to think about those trade-offs, so you will have to. So what can you do? You can automate. And automation is sort of the trendy thing these days. So there are many solutions to it. There's Puppet. There's Chef. There was CF Engine before that. I don't care what you use to automate it. I don't care if you write a Bash script or a Pearl script. If you want to write a Ruby script, that's great too. If you want to use Chef, if you want to use Puppet, that's awesome. But what you really want to do is tell the people that come after you how to actually spin up your infrastructure and how to run the code that you're writing. So the next thing, once you are automating, is that you actually want to test this stuff, because this stuff is even brittler than code. Automation depends on external services. Bringing up an instance always depends on an external service. And external services always change. And if you mock them out, you're not getting a whole lot. So you have to actually test based on the external services. This is actually an exciting space to be in. There are a lot of projects that are coming up now for figuring out how to test Chef. There are similar projects for Puppet. I'm sure I'm not as involved in the Puppet community, so I don't know. These are just a handful of the ones that are out there now. Food critic is a way to lint. Much like JS Hin is a way to lint JavaScript, food critic is a way to lint your Chef cookbooks. Mini test Chef handler is a way to write assertions in your, that'll run after your Chef recipes run. And similarly, Chef spec, I'm not entirely sure of, and Cucumber Chef is a way to integrate. It doesn't matter what you use. Just make sure that you're actually executing these, and you actually have a way to write assertions about the result when you execute these. The simplest way you can get started, I don't know if you're familiar with Chef, but this is a resource and a Chef recipe that I tend to put at the end of something that's installing a web server. So what this actually does is does exactly what any of you do as soon as you install Nginx. Can somebody tell me what you do when you install Nginx to see if it worked? You see if it's running, exactly.  So if your Chef recipe is installing Nginx, have it do that step two. And have it check that Nginx came up and is running on that port. You can get much more fancy than this. You can put this into some sort of test framework. You can make it activated when you actually start up Nginx so that it doesn't run every time if you're running Chef server. There are plenty of ways you can make this better, but the important thing is that you do something like this so that you get those same steps that you do to verify that what you did worked and put those in the recipe as well. Because the people coming after you don't know those steps that you do to actually see if things work either if they're modifying it. And they will try and modify it. Once you sort of have these, I wouldn't even, somewhat unit tests, the next important thing is an integration test. Integration tests are hard. They require a lot of thought as to how you're gonna bootstrap your infrastructure. I tend to tell people not to actually try and write the integration test till they have it working.  This is a cucumber spec. Sorry, I'm not a cucumber person. It's a feature. It's a cucumber feature that we use on our gem Lobot, which is a gem for spinning up EC2 instances to run EC2 instances to run Jenkins. So what this does is it actually goes out, on the local file system, uses our own Rails templates project. It makes a Rails app. It pushes it to GitHub. It then goes to EC2. It spins up an instance. It then bootstraps the instance. It stalls all the prerequisites to install Ruby. It then uploads the Chef cookbooks. It runs the Chef recipes. And then the key part is that it waits to see if that CI build was actually green. So it actually sits around waiting for the build of the sample project. And this test is green when you can actually build a project using Lobot. This test is a pain to keep green. Let me tell you.  How, what the pain is like. But when this test is green, I know that I can ship a new version of the gem and anybody using our Rails template will then be able to spin up a CI server without having to think about it. All they have to do is fill in the config file and I know it works because I've actually tested it end to end. Testing this stuff end to end is the only way that you actually know that it works. The next sort of topic, once you have your infrastructure amazingly automated and configured is that you need to monitor this stuff. How many of you know if your site is up right now? Not too many hands.  The people that said they're not getting a call, you're doing it right. The people who were like, eh, I don't know. Maybe somebody would tell me, you have a problem. You wanna be the first one who finds out when your site is down.  You want a service telling you. I tend to think that monitoring breaks down into three separate categories and will go through each one. I think it's helpful to sort of evaluate what kind of monitoring you need. I think you need all three of them and they're all a little bit different. The first is site level. Is my app down? I tend to use Pingdom for this, but this is the simplest app you can possibly build so there are 10 million of them out there. All you have to do is load a webpage and see what the response code is. We'll often make a controller action that actually exercises various parts of the site. So if you're using thinking sphinx or solar and it goes down all the time, being once or twice a month, if you have a test, if you have a controller action that hits the database and hits your search server or hits your queue service, whatever, you can just simply roll that up into a 200 response code, monitor that all the time. You might want to monitor your homepage as well. Hit those every few minutes and send yourself a text message, send yourself an email when those aren't green. This is the simplest thing you can possibly do. It will take you all of 15 minutes to set up and you'll be amazed when you first set this up how noisy it is because your site is down far more than you realize. External services are down and they don't necessarily tell you that they're down. You might notice on Twitter if it's a big enough service but you might not if it's a smaller service. I generally, when I set this up, I will tell the PM not to be scared because we send these to the PM as well and they generally, the first few they get, they're like, my God, it's been down for 10 minutes? Yeah, that's pretty normal. Sites go down. Usually, often it's in the middle of the night and nobody notices but your customers probably notice. The next sort of level that this breaks down into is server level. Maybe you're lucky enough to not have to think about servers but most of us do have to think about servers and once you have individual servers with names, even if they're just numbers, you probably need to know about the individual health of each one but you don't want one server to wake you up in the middle of the night. You want your monitoring for your site to wake you up in the middle of the night but you do not care if one of your app servers goes down. You should check this every morning perhaps or whenever it's convenient, have an awareness of it and sort of know if disks are filling up, know if you're running out of memory, know what sort of the gradual shape of your infrastructure is. If you look at graphs every day that's sort of monitoring your servers, you'll know when something goes wrong before your alerts go off. So this is valuable. It's not as valuable as site level monitoring but it is useful to have. The third class that I think a lot of people miss is business level monitoring and it sounds sort of enterprisey but it's not, don't worry. It's really just getting the metrics that define your site into tests. One example of this for an API I was working on was seeing how many movies by Tom Cruise we had in the data store at a given time. So we'd hit the API, search for Tom Cruise and see that he was in more than 35 movies. I think IMDb says 37 right now and if it's ever less than 35, you have a problem. This kind of thing would go wrong. If you're doing a data import, maybe they forgot to import an entire category that night. If we were in a heavily SOA architecture here so we were relying on external services to actually give us this data and you certainly can't rely on external services if it turns out. So actually having these tests that seem to be testing just like truth in the world and making sure that your app is also returning the same truth is valuable. If you're running a payments website, you can check and see how many payments went through in the last hour and see if that's below the lowest number of payments you've ever gotten per hour. If you're running Twitter, you can see how many tweets are flowing through the system. If you're running an e-commerce site, you can see how many orders you're processing. These can be time-based, but there are things about your site that you know that you could tell someone that people probably ask you, how many products do you have in your store? Well, I've got two million, it's amazing. Well, do you actually know that you still have two million? It's great to monitor these and actually when you look at your test run to say, yes, I do have two million because the tests are green. This isn't the same as your test suite for your code. This is a separate test suite, but it's a valuable test suite as well. Once you have monitoring and once you have your configuration automated, you can then refactor your infrastructure. You can swap out your data store and know that everything is sort of working as planned. It's extremely important to have this step, have everything set up before you can actually do this refactoring, but refactoring your infrastructure is just as valuable as refactoring your code. There are plenty of sites you come into and they'll tell you the infrastructure they have is there because somebody set it up once and it hasn't broken yet. And that means that it will break soon and no one will know how to set it up. So refactoring your infrastructure is great. It's worth doing and it's valuable. Why DevOps? So this is kind of the, I sort of tend to hate the term DevOps or I have a love hate relationship with it at least because really what it means is making the people who actually write the code in charge of keeping it running. And what that tends to do is unify the priorities quite a bit. If your site is down and it doesn't matter because you have no users, you might as well work on features, but if your site is down and you have a lot of users and you care about availability, the thing you should probably work on is keeping your site up. Usually it's not nearly as black and white as that, usually your site's down, one minute an hour or something because some job there is locking the database. We'll have some guy go look at that. And so being able to work on the most important story for your given application is useful and DevOps allows you to respond much better when there are issues. The example I showed in the beginning allows you to, it shows you that it's valuable to be able to respond to the issues and have the whole system in your head instead of just have the parts that you've worked on. I think as Rails developers, I don't know how widespread it is, but at Pivotal we tend to believe that you should be a full stack developer. You should be able to take a story and implement an entire feature. And if that feature includes solar, you should probably be able to install solar as well. So it's valuable, it lets you move quicker because you can be the one solving your own problems instead of having to rely on other people to solve your problems. And then when they don't solve your problems correctly, have to fix their problems later. The last sort of topic I have to cover is sort of a more pedestrian topic and less higher level, which is how to choose a hosting provider or as someone asked me why do all hosting providers suck? I tend to think that this is because we ask hosting providers to do too much for us. What you wanna look for in a hosting provider is someone who knows how to run boxes and how to keep them up and how to keep them available but not someone who knows how to set up solar for you. Not someone who knows how to set up MongoDB for you. Not someone who, maybe someone who knows how to configure a load balancer but you better be confident that they actually know how to configure a load balancer and they do it every day. When hosting providers tend to break down is when you ask them to do something that they don't normally do and they do it somewhat as a courtesy to you because they don't generally have the same patterns in place that they have in place for all of the other things that they do every day. So we've seen sort of transition from hosting providers and what we've seen works is relying on hosting providers for services they actually do as a service. So don't ask them to do things for you as a one-off. Don't ask them to set up your height. Don't ask them to fix your chef recipes. Well, you might want to. That would be amazing if we could find one that could but we haven't yet. But if they're setting up your deployment for you it tends to, in the long run it tends to make things difficult. I don't think that this, a lot of people hear me say this and say, well you're saying don't use Heroku. And I say no, definitely use Heroku. At Pivotal we tend to use Heroku for just about every app that comes in the door because even if they have a big ops story that's about being able to scale this thing to millions of users for some massive TV premiere what happens is doing that takes weeks and I'll be the first to tell you it takes weeks but that's not the most important thing to do the first week. And so start with something small start with a hosted service like Heroku and start getting the most important thing solved when the most important thing is scaling when the most important thing is using an exotic infrastructure that hosted services can't do then step back, take the time automate your configuration figure out how you're gonna do it figure out how you're gonna test it and actually take ownership of keeping the site up. Do we have time for one more story? Sweet, five minute, perfect. This is another test that we have testing the state of the world. What this test actually does is look for batteries near Richfield. This test has gone right a couple of times once because they switched to Energizer but that's not a big deal that's not what I'm here to tell you about today. What is even more impressive was that one day all of the stores near Richfield disappeared. So it basically simplifies down to this test which is there should be stores near Richfield we didn't actually think we needed to write this but we did. So we had to first start with getting an alert for the first test and narrowing it down going looking at the API, looking at the data that we were returning and finding out that we didn't have any stores near Richfield. Luckily, we'd gotten word a week or two earlier that the service that we were hitting to get the store data was rewriting their service and they were rewriting it in WordPress which was interesting because it was returning XML. I didn't know WordPress returned XML but apparently it can. It was a novel approach. I tend to encourage people to use WordPress as a CMS but not necessarily as an API. They're close, right? They're close. So what had happened was when in the course of implementing this API, let's call it, they had seen the area code field or I'm sorry they had seen the latitude and longitude and they had substituted the area code for that. So the Richfield stores had moved to something like, I don't actually know the Richfield but like 312, 312 on the globe which these are very weird places. This large retailer had stores in the middle of the Atlantic Ocean but none in Richfield. So what happened was because this was sort of the service oriented split out app, we had to then work back up the chain, find the right, you know, talk to the PM, have them go hit the people with the store service again, tell them to go fix their stuff. Luckily because we had encountered similar problems to this, we actually had been saving off versions of the stores file. We wouldn't actually delete data when we imported it, we'd save the old ones. So after getting into work in the morning I imported the old stores file which had stores in Richfield and we got batteries back in stock which was relief. So in conclusion, DevOps can often feel like this but with a little discipline it can be much more like this. This is how I picture myself working every day. The ergonomics of it are great. Let me tell you, you should try it out. Amazing, this is what I tell people I do. You know, I drop pictures of it, it's great. So that's about it for my prepared material. Does anybody have any questions for me? At Pivotal we're a large consultancy so we usually start a project every week and we start on Heroku and then we go with what works for the client. Usually the client has a strong preference or the hosting provider that they're going with has a less strong preference so we see both Sentos and Ubuntu. If you're gonna have an operations organization where you're gonna hire people that are operations people which I wouldn't necessarily recommend but when you get to a certain size seems to be inevitable those guys tend to have a lot of Sentos experience. If you're gonna have Rails developers that are gonna do operations which is a great thing those guys tend to have a lot of Ubuntu experience and there's nothing that either of those group of people can't learn but it's faster if you're going with what they start with. So it's sort of a person, it's really a preference of the project, it's a preference of the group of people that are gonna do it. It doesn't really matter and the long run is as long as you're automating it you can change and you can do it. I tend to like Sentos, I tend to feel it's a little bit more reliable than Ubuntu but I feel like tomatoes are gonna head towards the stage when I say that. So really do whatever. We're looking at actually switching most of our defaults to Ubuntu simply for the familiarity but we do both. Go, question? You can either make an API endpoint that's the same reflection of the data, so render JSON instead or you can grep through it. We implemented most of our actual checks not using our spec but just using Pingdom and actually starting on the results that we expected to be in the page. So we were using basically grepping XML which is generally, you can actually solve your problems that way but if you need to just make a separate endpoint for it and monitor that it's really, the time it takes isn't gonna be that important compared to the actual writing those tests and keeping them green. Yes, do you feel you've eliminated the noise problem of forgetting the boy who cried wolf where things will wake you up in the middle of the night and eventually you just learn to ignore them? On one project I had, it was very similar to that. We had a Nagios implementation that was constantly yellow and red and what we eventually determined and we had to sort of fight with members of the team who told us that this was sort of informational and that we shouldn't really worry about it, like it was good to know that things were sort of in a failing state but it wasn't our top priority and what we eventually settled on was that something that is yellow or red in Nagios was something you were working on that morning and so we would, we have stand-up every morning we would get in, a stand-up would involve reviewing all of those and if it was yellow or red we did not say oh it's okay, it was fixing the check. One of the things we had to do was write a reverse cron parser that would actually tell you when the last time a cron job should have ran instead of the next time it'll run. So you basically just run the code in reverse but that allowed us to write checks that were actually based on two hours after a job should have run something should have happened as opposed to around two o'clock something happens but not every day. So getting that to a point where it was green was an incredibly valuable part of the project and it required a lot of discipline to actually do you have to focus on that and keep it valuable. We still did not get woken up by our Nagios alerts. We got woken up when the site was down but we didn't worry if an individual server was having problems. Hopefully you can get to a point where you don't have individual servers if you have to worry about from home. Cool, question in the back. We would have those as part of our monitoring. It's certainly not something you wanna run before every check-in. For modern thing, one thing that's a great option is just make a separate Jenkins job that actually tests the real world. So you have your test suite and you also have your suite about is the app up or not? Is the app running how you think it should be running? Often called the external suite or the production suite, whatever you wanna call it. It's usually pretty quick. It's not instantaneous because it actually has to hit a service but it's not that long and it doesn't. Those kind of things are the sort of business level metrics aren't generally like the site is down emergencies. It's more of a, huh, that's interesting. Why is that? Let's go look at it and figure it out. That similarly requires that discipline of actually making sure those things stay green. We're big proponents of blue-green deployment and so it's really useful to be able to have one environment or have both environments and know that both of them are up to date. You can take one down, you can destroy it, you can build it back up, you can reshuff it and then when it comes back up you run the test against it, looks okay, let's cut over to it. In the back? No, there's no rule of thumb unfortunately. You can write a book on it it really depends on what your app is doing and what your load pattern is gonna look like. I think the most important thing is to be able to react and sort of figure out why your load has changed and why your load might change in the future. So we actually, for this project, for a large retailer we knew that we were gonna have extensive load on that day, we just didn't know how much. And we didn't know that the code was actually gonna change and increase the load substantially. Luckily, the code we could change the people coming through, you can't necessarily change but you do want to sort of plan for what the growth pattern's gonna look like. And every service is different. Some services have sales people going door to door and their load growth is gonna be extremely low.  If your plan is to get listed on TechCrunch and then you're gonna have great success, maybe you need to plan for some significant level above what you already have provisioned. However, all of those people from TechCrunch are soon gonna stop visiting your site so you don't need to worry too much. Cool. I haven't been cut off yet, so if there's one more question, I'll take it. Otherwise, I will leave you for the next one. Cool. There we are. Thank you.