When I heard about Apple’s M1 chip and its incredible performance, I set out to understand what's so magical about it. Within minutes of research, I found out about the ARM-based architecture it uses. Of course, there are many other improvements, but ARM-based chip was the essence of it.
I could see AWS too came up with its own series of ARM-based Graviton instances. So, I decided to try out a low-end t4g.micro instance with a free trial until March 31st, 2021.
I soon realized that not all applications/packages are compatible. Some are still in the progress of porting to ARM-based architecture and going to take some time for a complete transition.
As most of my projects are deployed using docker and docker-compose, I tried to install them first. Fortunately, docker got installed smoothly, but then docker-compose was not :(
After some trial and error, I installed it from a custom image on LinuxServer.io.
To install docker:
yum install docker
To install docker-compose:
curl -L https://github.com/linuxserver/docker-docker-compose/releases/download/1.28.5-ls32/docker-compose-armhf | sudo tee /usr/local/bin/docker-compose >/dev/null
After docker and docker-compose, your container images should also support ARM architecture, to be able to deploy the stack successfully.
For example, I tried to deploy my Wordpress website and realized that MySQL still doesn't have support. So, I was forced to use MariaDB instead.
I did get my stack (Wordpress website — Nginx, MariaDB, PHP & certbot) working though and after that, it was a piece of cake!
I executed some tests and could immediately say that the performance of t4g.micro is much better than t3.micro (have X86 traditional architecture).
The best part is you get t4g at a lower price than t3 :)
I'm using it for almost a month now and feel that it could be used for production workloads reliably. Docker makes it easily portable to other ARM-based instances. So, try it out and let me know your thoughts in the comments.