ECS Instances

Contents

Alibaba Elastic Compute Service
1
ECS Concepts
PREVIEW9m 21s
2
ECS Instances
PREVIEW17m 58s
3

The course is part of this learning path

ECS Instances
Difficulty
Intermediate
Duration
1h 40m
Students
155
Ratings
5/5
starstarstarstarstar
Description

This course explores Alibaba's Elastic Compute Service and the features it offers to manage your Alibaba instances. We'll look at the main applications of the ECS service before moving on to a couple of guided demos from the platform to show you how to use the ECS service.

Learning Objectives

  • Get a foundational understanding of the main concepts of Alibaba ECS
  • Learn about the different instances available in Alibaba Cloud, including their features and use cases
  • Learn the capabilities and limitations of ECS storage
  • Learn how to connect instances together through ECS networking, specifically through the use of VPCs
  • Learn how to create an ECS instance and attach a data disk to it

Intended Audience

This course is intended for anyone looking to use Alibaba ECS to manage their Alibaba Cloud workloads, as well as anyone studying for the ACP Cloud Computing certification exam.

Prerequisites

To get the most out of this course, you should have a basic understanding of the Alibaba Cloud platform.

Transcript

We next turn our attention to ECS instances. So an instance is a virtual computing environment, we can call it a virtual machine, which includes CPU, memory, storage, and the other fundamental components required to run a modern operating system. That is what's presented to you, the user, when you create an ECS instance from the Alibaba Cloud console. Now the ECS service provides a wide selection of instance families and types optimized to fit different use cases.

Instance types comprise varying combinations of CPU, memory, storage, and network capacity. There are a few types here at the bottom of the slide that are fairly common instance types. There's the burstable type, which we call T6. That's the sixth generation burstable type, general type, G6, compute optimized, C6, and memory optimized, R6. We'll talk about what some of the differences are between those different instance families later on.

So to understand the instance naming conventions, we have an example here. So all ECS instances will start with the prefix ECS. So all instance names start with ECS and then a period. After that is the instance family. So this will indicate the ratio of vCPU to memory and any special hardware that the instance might include. And the instance family will also include the instance generation. The generation number increments over time as we add new and better hardware to our data centers.

So right now the newest hardware is the sixth generation Alibaba Cloud server hardware. So G6 indicates that this is a general purpose sixth generation ECS instance. What does that mean? Well, general purpose instances have regular x86 server hardware and they provide a vCPU to memory ratio of one to four. So for every CPU core in a general purpose instance, in a G instance, there will be four gigabytes of RAM. The instance type is all the way to the right. This indicates the actual specification of the instance, how many vCPU cores does it have? An xlarge would have four vCPU cores. So a three xlarge would have three times four, 12 virtual CPUs.

So we can expect this instance to have 12 virtual CPUs and four times that much memory, because the general purpose instance will have a CPU to memory ratio of one to four. So we can expect this instance to have 12 vCPU cores and 48 gigabytes of RAM. Now there are a variety of different instance families to choose from based on your workload. Here we do our best to summarize the common x86 based server hardware that's available. So we have the T6 and the S6 class all the way to the left. These are for light workloads.

These instances have a CPU usage cap or a limit. These are intended for workloads that are not CPU heavy, maybe a small website, or blog, or a testing or development platform. The T6 and S6 instances accumulate CPU credits during times when they're idle, and these credits give the instance the ability to burst. That's why we call them burstable instances up to 100% CPU usage for a certain amount of time. So one CPU credit gets you one minute of CPU time at a 100% utilization.

So what happens when you run out of credits? Well, your CPU usage gets throttled back down to some baseline. So these instances are not really where you want to be running an important production workload, they're really for light usage. Then there are the G and C type instances. These are general purpose instances for more compute-intensive workload. They not have a CPU limit, you're not throttled down. You could use these maybe as backend servers for a website or for a mobile platform. They're very general purpose. You could use them for serving ads for video encoding, really any type of task.

Then there are the D type instances, the D1 and D2 here. So there's the D2S and D1NE. These are enterprise instances for big data applications. This is where you'd want to run Hadoop or HBase or MapReduce. If you had a spark in memory, computing job, you could run that on these instances as well. They have a lot of RAM and they have local disks for high performance disk throughput. Then there the R5 and R6 and RE6 instances. These are memory optimized. These have a vCPU to memory ratio of one to eight. So you get eight gigabytes of RAM for every virtual CPU core. These are for high performance in-memory databases, data mining, SAP, basically any memory-heavy workload.

And then there are the I instance classes. These are for I/O intensive workloads. These typically include super fast local disk. So these have high-speed local disc storage that you can utilize to accelerate applications that require high-speed persistent storage. Then any instance with an H in the name from any of these other classes, any instance with an H in the name is a high clock speed instance. So we'll have a higher CPU clock speed. So for instance, if you saw maybe an HFG6, that would be a high frequency, general purpose, six generation instance. So we'll have the same CPU to memory ratio and same hardware as the regular G6 instance, but with a higher CPU clock speed.

There are also some special purpose x86 instances designed for special workloads. We have the SCC instances. These are designed for supercomputing clusters. You can use these to build super computing clusters for industrial simulation or genomics. They are essentially ordinary Alibaba Cloud servers, but they have RDMA enabled, remote direct memory access, and they have very, very high speed convergent ethernet connection. So they can be networked together through a very super fast network backbone. In fact, the SCC instances are actually a special purpose version of the EBM instances, which you can see on the right-hand side of the slide here.

The EBM instances are what we call elastic bare metal. These instances have no virtualization layer. So these instances don't have a prebuilt virtualization layer included on the machine. They are raw physical hardware. So if you want to run your own VMware stack, or you want to run OpenStack or ZStack or some virtualization solution, you can run that on these instances because there is no hypervisor running on these. It's just raw hardware. It's like buying your own server, but it's elastic, it can be provisioned within minutes, and it can integrate seamlessly with all of Alibaba Cloud's other products. So these EBM instances are a popular choice, say for doing a direct migration of a VMware environment to the cloud, or for running certain application stacks that do not support virtualization, like say an Oracle database.

We also then have heterogeneous computing ECS families. These are instances that includes special purpose hardware for some particular task. So any instance with GN in the name will include a GPU. You can use the GPU either for machine learning tasks or for visualization, game streaming, maybe high-speed media transcoding. And then there's the F class instances. These include an FPGA card. So if you have some purpose built algorithm that you want to run on an FPJA card to do super fast processing, you can use the F class instance.

So what about these bare metal instances? I want to go back to bare metal because it's a very interesting and unique cloud product. So the advantages of bare metal are that you get the elasticity of virtual machine. You can create or spin up a bare metal instance at anytime you want. You get automated operations and maintenance, because the bare metal instance incorporates itself into the rest of the Alibaba Cloud ecosystem. So you can use all of our monitoring and security tools. You can put this instance into a virtual network group, just like you could with any of the ECS virtual machines. So it's a physical machine that has all the advantages of a regular ECS VM, and you get the advantages that only come with a physical machine, zero functionality loss.

If you need to use Intel VTX instructions, if you want to use Intel SGX, you can do that. You get zero performance loss because there is no virtualization overhead, and you get hardware level isolation. You were the only tenant on the machine. So you don't have to share with any other users. This table here just summarizes some of the advantages of the bare metal instance. Essentially, you get the advantages of a traditional physical machine plus a lot of the advantages of a virtual machine. So it takes these two sets of advantages, physical machine and virtual machine, and combined some of them.

So here are the bare metal instance specifications. You'll notice that the bare metal instances are all very big machines, they're all very powerful. The smallest one is the fifth generation super compute instance, which has 64 CPU cores. That's the smallest one. The others have 96 or 104 CPUs and up to 768 gigabytes of RAM, although that is upgradeable to over a terabyte if you work with our solutions team. They can give you more memory than that if you need it. And you'll notice that the bare metal instances can, if you need, be equipped with super high speed convergent ethernet interfaces, or GPUs, up to eight V100 GPUs can be attached to a bare metal instance.

So if you need ultimate performance, this is the way to get it. Here's a scenario where bare metal might come in handy. So again, because there's no virtualization, you can use the raw hardware directly. That means you can use special purpose functionality. That's built into the Intel processor. So for instance, on newer Intel Xeon processors, there is the SGX extension, which allows you to create basically an encrypted, trusted execution environment at the chip level that lets you store your data and code in a trusted enclave, a private region of the computer's memory that's not readable by anybody else, not by the operating system, not by other applications.

So if you are in FinTech or banking or some other fields with extremely high security requirements, being able to use SGX is a big advantage. Another scenario where bare metal is useful is revirtualization. If you want to directly run a Docker container workload. So you don't want any virtualization between your Docker containers and the hardware, except for of course, Docker itself, then you can run containers directly on a bare metal instance. If you want to install your own private cloud stack like ZStack or OpenStack, you can do that. If you want to use KVM yourself or install Microsoft Hyper-V or use VMware directly, you can do that as well. All of that is possible on the bare metal instances.

Another scenario is, of course, supercomputing. Our SCC instance class is a bare metal instance that just has a high-speed network interface. So if you're interested in building a supercomputer cluster, bare metal is a good way to do that. And it's also a fast way to do that because you can provision the machines in just a few minutes. Then there's ECI. I include this here because it's something unique. ECI is a way to run containers without allocating servers on your own. So ECI is actually a component of the ECS service that lets you directly run containers without collocating individual ECS instances. And this actually works with our Alibaba cloud Kubernetes service.

So if you want to build a serverless Kubernetes cluster, you can tell Kubernetes to launch all of its containers using the ECI engine. And then you don't have to manage your Kubernetes worker nodes because there are no worker nodes for you to manage. ECI takes care of it for you. So you get great elasticity that way and you pay only for the actual deployments that are running on your K8s cluster. You don't have to worry about allocating and running your own ECS instances.

One final thing here, instance fail over. So how do we handle failures? So our uptime percentage for our instances for a single virtual machine is 99.975%. That's our monthly uptime. Also, if you do a multi zone deployment, meaning you have instances across multiple zones in a region, then that can go up to 99.995%. These are the SLAs that we offer for a single region for either a single or multiple ECS instances. Again, that's 99.975% or 99.995%, which is really, really high uptime.

So the virtual machine service that ECS provides is extremely reliable. However, if 99.975% reliability isn't good enough, if you're worried about having an Alibaba Cloud zone fail, then what you want to do is deploy instances across multiple zones within the same region and build your architecture to have built in fail over, to have some fault tolerance. That way, if a zone does go down, you won't suffer. Within a single zone, if a single rack or a single server fails, that's no problem. We will actually live migrate your VM to another physical machine that's healthy.

So within a single zone, you don't need to intervene at all to deal with hardware failures. We take care of that for you. However, if a full Alibaba Cloud zone were to fail, then you do need to have some plan to have a backup running for your service in another different zone. So how does billing work? Well, there's essentially three different modes. There's actually four. We'll talk about the fourth one in a little bit. So there's pay-as-you-go, you pay for compute capacity by the second, or we bill you based on your hourly usage.

So at the end of the month, we will present to you a bill based on how many hours of ECS compute time you used. And of course the cost per hour depends on the ECS instance family and type that you select. Then their subscription. This is a pay-upfront model. So a month or several months or a year in advance, you pay your fee for the ECS instance and then the instance gives yours for that period of time. So maybe I need a G6.xlarge, and I know that I'm going to need it for six months. Well, I can pay up front for the whole six months. And then for that six month period the instance is reserved for me.

The disadvantage of subscription is that you cannot delete the instance and start over. So you have to decide in advance what region and zone you want to use. The upshot, the plus, the advantage here is that the discount is up to 85% compared to pay-as-you-go pricing. So if you really do know that you're going to have stable long-term usage, subscription is a good safe bet. Then there's the preemptible instance. 

Preemptible instances are a way for us to sell unused Alibaba Cloud computing capacity at a discount. These are basically pay-as-you-go instances that offer a very low pay as you go rate that changes based on supply and demand. So basically we have an asking price, an amount per hour, which is lower than the normal pay-as-you-go price. You submit a bid. If your bid is greater than or equal to the asking price, then your instance starts, and we guarantee your instance will run for at least its first hour. But after that, if your bid price is no longer higher than our asking price, or if we run out of capacity for our regular PAYG customers, then we can interrupt your workload and to shout your instance down.

So this is actually a great way to save money on batch processing, like processing logs or doing video transcoding in the background, tasks that can easily be checkpointed and can be continued later are a great choice for preemptible instances because you get a big, big discount compared to regular pay-as-you-go. And most of the time, as long as your bid is high enough, your instance will continue to run. It's just when we run out of capacity or there's more demand for the preemptible instance service that our prices will increase. And when that happens, you can either choose to match our new asking price and keep your instance running or let it shut down, whichever you prefer, but it is a good way to save money for batch workloads.

Then there are reserved instances. So this is a cool model. This is sort of halfway between pure pay-as-you-go and subscription. So with a reserved instance, you buy something called an RI. You can think of it as being sort of like an ECS instance coupon. And that RI can apply either to a particular region and zone or just to a particular region leaving you flexibility in which zone you choose. And the RI has three payment modes, no upfront, partial upfront, and full upfront, each of which offer different amounts of discount.

Even with a zero upfront payment, because you're committing to long-term usage, the RI offers you a discount over pay-as-you-go. So even if you pay nothing up front for your reserved instance RI, you still save some money over raw pay-as-you-go and you get therefore, some of the advantages of the subscription, but unlike a traditional subscription, you can, if you want, delete your instance and create a new one, which gives you more flexibility in how you provision your instances. So it's still on demand like pay-as-you-go, but with some of the cost benefits of a subscription model.

About the Author
Students
611
Courses
18
Learning Paths
2

Alibaba Cloud, founded in 2009, is a global leader in cloud computing and artificial intelligence, providing services to thousands of enterprises, developers, and governments organizations in more than 200 countries and regions. Committed to the success of its customers, Alibaba Cloud provides reliable and secure cloud computing and data processing capabilities as a part of its online solutions.