By Alberto Roura, Alibaba Cloud Community Blog Author.
In this article I'll go through the advantages of using Aliyun Linux, a CentOS-based Linux distribution developed and maintained by Alibaba Cloud. Compared to other available Virtual Machine images like Debian/Ubuntu or RHEL/CentOS (amongst others), Aliyun Linux is made in the cloud and for the cloud.
Alibaba optimised this distribution to the point that, if your application is going to run on an Alibaba Cloud ECS, makes a lot of sense to use it. Some of the optimisations are:
This article assumes that you already have an Alibaba Cloud account. Click here to create one if you don't have one. For this example, I'll be using the web console to create an ECS instance with the latest version of Aliyun Linux 2, if you want to deploy it using Terraform, check out my blog, Deploying and Best Practices with Alibaba Cloud, to get an idea of how to start.
To keep things easy, let's create the ECS Instance by using the Quick Launch mode, a very neat and tidy interface to quickly create an instance with the most common options used. If you need more control you can click on the "Custom Launch" tab.
Whichever option you choose, the only difference compared to launching other Operating Systems is in the "Image" part, where you should choose "Aliyun Linux" from the list or dropdown.
Remember that, if you want to create the instance just to play a bit, select "Pay-As-You-Go", otherwise just go with a "Subscription" mode where you can save some money over time. If everything looks right, click "Create Instance" in the last step and in around 1 minute or less, your Aliyun Linux-powered ECS will be ready to accept SSH connections.
The new ECS showing off the shiny Alibaba Cloud logo
We can keep talking about the technical advantages of Aliyun Linux forever, but without real-world scenarios to showcase, this would be empty. Let's have a look to the best and most popular use-cases.
Forget about writing API keys and secrets to environment variables, since this Linux distribution comes with aliyun-cli
, all API calls will take advantage of the RAM role applied to the Virtual Machine itself. This makes your application deployment way safer, manageable and predictable. You can do things like:
All of the above without using credentials explicitly, quite cool if you ask me. Just make sure your RAM Role has a Policy granting access to those resources, of course!
If you are developing a very experimental piece of software and you expect the binary to crash, freeze or behave weirdly very often, you can enable, at any time and no rebooting, kdump
and check what is going on. kdump is a feature of the Linux kernel itself that creates crash dumps in the event of a kernel crash.
For this to work, just run systemctl enable kdump.service && systemctl restart kdump.service
and the next crash will be logged. To disable it, run systemctl disable kdump.service && systemctl stop kdump.service
.
I still recommend you to use RDS to run databases, as it brings down the maintenance requirements from your side. It automates backups, replications with a few clicks and they run always in a very optimized environment. But if for business or technical requirements, you need a custom-made MySQL, NoSQL server or real-time analysis applications, Aliyun Linux has your back. If you connect an ESSD to the instance, you can expect a very high performance. ESSDs (Enhanced SSDs) are currently based on a 25GE network and RDMA (Remote Direct Memory Access) technology. This technology comes perfect when short latency and high throughput are required, like OLTP and other file-intensive scenarios.
As Aliyun Linux is optimized to be used on ECS instances, all operations involving instance creation, reboots and startups will happen faster and your application will scale more precisely. Personally, I find the time from launching an instance for it to be fully operative (I can see system logs) incredibly fast compared to other images, including Linux images running on other cloud service providers.
Think about scenarios where you have some auto-scaling rules to get triggered when certain metrics are on the limit. With faster startup times, your Load Balancers will get backends ready to get used in a much shorter time.
As you can see, even for a Debian fan like myself, Aliyun Linux comes as a natural selection when using Alibaba Cloud ECS instances. There is way less overhead when setting up my projects and using ECS in combination with other resources.
Give it a try and thank you for reading!
8 posts | 4 followers
FollowAlibaba Cloud MVP - December 13, 2019
Alibaba Clouder - August 14, 2020
Alibaba Clouder - August 28, 2020
OpenAnolis - July 7, 2022
Alibaba Cloud Native Community - May 31, 2022
Alibaba Cloud Native - May 23, 2022
8 posts | 4 followers
FollowAlibaba Cloud Linux is a free-to-use, native operating system that provides a stable, reliable, and high-performance environment for your applications.
Learn MoreAlibaba Cloud Function Compute is a fully-managed event-driven compute service. It allows you to focus on writing and uploading code without the need to manage infrastructure such as servers.
Learn MoreSecure and easy solutions for moving you workloads to the cloud
Learn MoreRespond to sudden traffic spikes and minimize response time with Server Load Balancer
Learn MoreMore Posts by rouralberto