Join the community today
Register Now

Creating HA solutions on AWS using CENTMIN MOD as a LEMP stack

Discussion in 'Introductions' started by gooseegg, Nov 1, 2019.

  1. gooseegg

    gooseegg New Member

    7
    0
    1
    Nov 1, 2019
    Ratings:
    +0
    Local Time:
    3:22 PM
    1.17
    10
    Hello People. New guy here.

    I keep on hitting the same challenges which I suspect you guys share. A client requires an HA (say WP for discussion here) on AWS ( I am sure the discussion is also relevant to GCP, Azure and the rest). They also want highly performant stacks.

    I build them suitable AWS infrastructure/platform for their solution and use premade stacks (say LEMP ) or even with baked in apps (LEMP + app). All is good. The problem is their LEMP stacks are not as performant as CENTMIN MOD. I have been spying on you guys the last couple of years and testing your stack which keeps out performing the others but it's not suitable for HA use.

    I am done spying on the sideline and I finally decided to come here and bring this particular aspect to your attention. Slight changes in the configuration can make CENTMIN MOD be suitable for cloud applications. It's not like it cannot be used on the cloud, but making it work is a PITA

    There are few points to keep in mind. The LEMP resides on VMs/EC2 in an autoscaling group that feeds off a load balancer. EC2s pop in and out of existence according to demand. SSLs typically get terminated at the LB. EC2s remain in private network (VPC) with their SG accepting inbound only from the LB. Hence, the SSL, firewall etc configurations are not as relevant (except for the SSL, to forward the header to the app downstream so that it knows the users are requesting over https: or else, the app will construct a response URL over http and the end users' browser throw a feat and claim there is unsafe script.

    Focusing on the autoscaling group, as demand increase, new EC2 is spun. Installing the CENTMIN MOD at boot is out of the question as it takes too long. Hence, the only viable solution I see (assuming immediacy is a must) is to install the stack, configure whatever app is necessary, then bake a golden EC2 Image (AMI). Then spin that on and configure the fewest details during boot. The problem with such setup however, is that some machine info are hardwired during setup.

    And that is what I want to bring to your attention. Why not make it configurable with init? Thus far I notice host names, host ip are hardwired say for WP configuration. The WP on CENTMIN MOD is super fast but unfortunately not easy to make HA. True it's possible to write a script at init and alter the configurations but not clear how many of these configurations need to change as I am not aware what other info are hardwired.

    As a general principle, the stack - I understand it should be optimized for a specific type of machine - but this does not mean it needs to be aware of the particular identity of the machine or the env. As the cliche goes, the servers need to be the cattle , not the pet, and the stack can be performant for particular breed of machines (the cattle) than a specific machine we tend to care for (the pet).

    If only you guys can do that :). I am glad to provide free consulting with regard to the AWS env ( I have spent 8K + hours on it and while the ecosystem is too complex for one brain to master, I am quite familiar with it) as I am interested to make it work on AWS hassle free. Like I said the same concept extends to other CSPs. So any CENTMIN MOD expert interested in this endeavor?

    Thanks for reading :)
     
  2. eva2000

    eva2000 Administrator Staff Member

    42,079
    9,499
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,615
    Local Time:
    7:22 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    welcome @gooseegg to Centmin Mod Community. Thanks for joining the community - always good when lurkers become members :)

    Indeed, some work on this in Centmin Mod 123.09beta01 has been made due to DigitalOcean 1-click Market Place development work for building DO droplets with pre-installed Centmin Mod 123.09beta01 installs via Packer.io and accounting for different DO VPS hardware specs. Example of Packer.io building DigitalOcean droplet image with a pre-installed version of Centmin Mod. Packer.io supports DigitalOcean, Azure, Googe Cloud, Docker and even Amazon AWS image building though I have only worked with DigitalOcean image builds so far due to the cost involved in working with the other cloud providers.

    Rather than discuss this in intro thread/forum, best for you to start a thread in System Administration forum at System Administration :)

    There's 6 steps to learning more about Centmin Mod ;) And to modifying config files and manage services more quickly, check out Centmin Mod Command Shortcuts.

    Might also be interested in reading up on latest LEMP stack comparison benchmarks tagged here.

    You might want to try the 123.09beta01 build as it will be next stable release and well has alot of improvements if you check 2nd post change log at Beta Branch - Centmin Mod .09 beta branch Testing. And you can share your initial install times here.

    Threads you might want to participate in ;)

    Quick Tips


    Threads & Info To Bookmark



    Threads to read, pages to bookmark and threads to watch/subscribe to get to know Centmin Mod would include:

    Centmin Mod Insights Forum



    The Centmin Mod Insights forums digs deeper into the inner workings of Centmin Mod so some useful threads in this forum include:

    Security Related Developments



    A few security related developments you might be interested reading about

    Premium Membership


    Centmin Mod Donations



    You now can show your love and support for Centmin Mod via
     
  3. gooseegg

    gooseegg New Member

    7
    0
    1
    Nov 1, 2019
    Ratings:
    +0
    Local Time:
    3:22 PM
    1.17
    10
    Thanks. I will digest your post and start a thread in the sys admin as you suggested.