Hello all, I am creating a new AWS EC2 instance t...
# cfml-general
p
Hello all, I am creating a new AWS EC2 instance today, and am wondering which is the best instance type for Lucee w/MariaDB on Linux? I have always used General-Purpose (M6a), but am wondering if Memory-Optimized or Compute-Optimized might be a better fit. It is for a warehouse inventory management system, so the majority of its usage is complex queries that return somewhat large datasets. On a side note, I am considering using NGINX instead of Apache but have never used it, so any suggestions on that would be helpful as well. Thanks!
e
It's just a guess without knowing your app or the number of concurrent sessions, but here is the general rule of thumb we use as a baseline: 2 processors , 4 GB of RAM, 20 GB of storage, and always Apache httpd over Nginx. Pretty sure you could just buy an instance like that on lightsail these days (its another was product for those who do not want to ulra micro-manage services of their instances) I can go in to the reasoning behind Apache httpd over nginx, Nginx does use less memory, Nginx without any modifications serves static requests faster than apache httpd. That being said, you lose a lot of flexibility by going with it. Apache httpd, supports mod_cfml, apj, has nearly a thousand plugins, many of which have been around over two decades, and if you decide to spend all of 5-10 minutes either compiling your own or just removing all unneeded extensions, apache httpd performs nearly as fast as nginx on static files and faster on URL rewrites, and slightly quicker handling tomcat / ColdFusion requests.
👍🏻 1
p
GOOD info, thanks!
I really need to look into Lightsail because we are currently paying over $500/mo for our EC2 server, and don't feel like we are utilizing ANY of that cost.
p
Any specific reason using M6a vs a t2.xl for example? I also pref NGINX over apache but depends on env needs.
p
No reason. I am not familiar with the T instance types at all.
p
Investigate around on types, I am pretty sure M level are pricey:
p
Yes, I read through that this morning which was the reason for my original question. 😁
p
Go for a T2 or T3 level if you are just needing a baseline box
p
YIKES, a T2.xl is over double the cost of an M6a.
p
Ok you lost me there, you implied you were paying 500/mo for a single instance.
p
Because we are also currently using a Windows Lucee AMI on top of the base server costs, which is why I am attempting to build one from scratch today.
p
Get rid of Windows 100%
p
My Lucee server is my ONLY Windows server. All of the rest of my servers run Linux, which is also why I specified Linux in my original question.
p
Just go with baseline Ubuntu 22; or dockerize it
q
I would honestly take a look at how much ram/cpu you actually use. First thing I would do is split off the DB from the CF/HTTP server. You can get a really nice EC2 instance that only does httpd/cf and then use Amazon RDS and scale each as needed for a lot less than $500/month.
Even my hardest hit Masa sites I spend about $60/month between both the RDS and EC2 servers
(I personally recommend going Docker for the CF side, put an HTTP proxy up front, then use RDS or another DB service for the DB, but that means mucking with your code a bit more. Lightsail is amazing for CF docker instances.)
p
Thanks, I will look into these as well.
e
He may have dependencies that do require Windows., 2, Linux yes, Ubuntu - Not recommended, Alamlinux (RHEL CLONE) secure, fast, and far less resource hungry than Ubuntu
p
I prefer RHEL but depends on simplicity and how hard need to make it.
👍 1
Thats why I said Ubuntu, since its easy for nearly anyone
e
yum or dnf isn't hard. Canonical did a great job marketing Ubuntu as "easy" and then tried to do so with all kinds of nonstandard configurations under the hood.
p
You are referring to deeper config details type of technical user vs someone who needs simplified basic stuff, not a lot to worry about with baseline
e
• In RHEL / CENTOS 6-9X, installing apache for example is: yum install httpd , in ubuntu or debain its apt-get update, apt-get install apache == Next start apache, rhel -- systemctl start httpd -- ubuntu / Debian:: sudo service apache2 start all RHEL /Clones Root = GOD, all debian, sudo is optional, UBUNTU - sudo is required and even root is not "GOD" in many cloud instances. RHEL /Most clones, google how to do X on Apache, and per the documentation, it just works; with Ubuntu / Debian, throw out the official documentation and let's do it the Debian / Ubuntu way, which is not fully documented. We can go line by line, but saying "Ubuntu" is easier, is a point of view,
q
Personally, if I'm in the EC2 space, Amazon Linux is great. Patches come out fast and configs are pretty straight forward. They base it off the "Enterprise Linux" setup that RHEL, Rocky, CentOS, SuSE and others base things off of.
👍 1