Hi Everyone,

I’m currently hosting around 70 informative websites using Enhance, all on a single server with the following specs:

  • 16 GB Memory / 4 Intel vCPUs / 160 GB Disk - Ubuntu 22.04 (LTS) x64

Each website required on average 2GB of storage space.

While this setup has served me well, I’m planning to switch to a multi-server architecture for better scalability, cost control, and load distribution. Here's what I have in mind:


Proposed Architecture

1. Control Panel (CP) Server:

  • Role: Host the Enhance control panel and the main domain.
  • Specs: 2GB RAM, 90GB NVMe SSD, 2 vCPUs
  • Total Websites: 1

2. Production Website Servers:

  • Role: Host around 50 production websites.
  • Specs: 2GB RAM, 90GB NVMe SSD, 2 vCPUs (x2 servers)
  • Total Websites: 50 (distributed across 2 servers)

3. Development Server:

  • Role: Host around 20 development websites (non-production).
  • Specs: 2GB RAM, 60GB SSD, 2 vCPUs
  • Total Websites: 20

Goals for the New Architecture

  1. Scalability: Easily add or remove servers as my hosting requirements change.
  2. Load Distribution: Distribute websites across multiple servers to avoid overloading a single machine.
  3. Disaster Recovery: In case of a server failure, move websites to other servers with minimal downtime.

Questions and Considerations

  1. Email Hosting:
    I’ve read in various discussions that it’s better to have a separate server for emails. Should I consider adding an email server just for production websites' emails? If yes, what specs would you recommend?

  2. Database Hosting:
    For now, I plan to host databases on the same servers as the websites. Is this a good approach, or should I consider a dedicated database server?

  3. DNS Management:
    I’m a bit unclear on how DNS will work in this multi-server setup. Will all websites point to the CP server’s IP, and Enhance will handle the routing to the correct server? Or should each website point to the IP of its respective server?

  4. Specs:
    Are the specs I’ve chosen for the servers (2GB RAM, 2 vCPUs, 90GB NVMe SSD) sufficient for this type of setup?


Additional Context

  • Around 20% of the websites are non-production (development websites).
  • All production websites are lightweight, requiring around 2GB of storage each.
  • My current server setup on DigitalOcean doesn’t allow me to scale down, so I want to leverage a multi-server approach for better cost control.

Seeking Your Input

Does this architecture make sense for Enhance? Are there any pitfalls or improvements I should consider?

Looking forward to hearing your thoughts and learning from your experiences!

Thank you for reading through!

    • Edited

    The plan is decent.

    With regard to mail, I would just go ahead and setup a separate mail server from the start. You will be more familiar with disk space required, but 2 vCPU /4 vCPU & 4GB RAM is plenty for email handling based on the # of sites you are planning.

    Datatabase
    I would not separate the database from the sites. We have tested this with up to 40Gb/s NIC on a back-end connection and there is still a measurable pause taking place. Just place the App/DB role together on each hosting server for best performance.

    DNS
    We setup separate and geographically diverse DNS servers in our cluster, but you can start with that role running on your control and production server and move it later as you grow. 2GB RAM / 2vCPU is more than enough, storage we do 10GB for those servers (JIC).

    Backup
    I do not see backup server. You need a dedicated backup server. Again 2 vCPU and 2-4GB RAM with enough disk space on second BTFS partition to keep the backup retention you require. I would go to a separate provider (Linode or any others recommended in the forums) for the backup server to keep that data "offsite" in case of emergency.

    Also, make SURE you have a solid image of the control server - that may cost more at DO, but if something happens it will save your bacon until such time as the Enhance team is able to provide the ability to transfer control server to other VM/hardware.

      I'm in agreement with 8Dweb.

      Separating the database is only good if the website is for some reason database sensitive. I personally have one online store that has 1 million products (yes 1 million) lol. This site has its own little VPS with mariadb on enhance, separate from its file system which is stored on the shared server with other sites. The database VPS takes a nice beating always at 70%+ CPU.

      But the clients pays accordingly.

      aymanaaoun Role: Host around 50 production websites.
      Specs: 2GB RAM, 90GB NVMe SSD, 2 vCPUs (x2 servers)
      Total Websites: 50 (distributed across 2 servers)

      They are WordPress websites ? I don't think this server will be enough. You may need to optimize it or just get a better one.

        adil Agree. If they're custom written maybe you could make them run, but if they're wordpress, you would do better to upgrade that specs, at least the ram.

        Plus, as 8Dweb said, also consider a backup server because the native backup service of Enhance works very well and i recommend you to put it in the cluster.

        adil I agree. 4GB/4vCPU would be a good starting point for the app/db server, but check performance on the DO data center you choose before finalizing.

        aymanaaoun Role: Host around 50 production websites.
        Specs: 2GB RAM, 90GB NVMe SSD, 2 vCPUs (x2 servers)
        Total Websites: 50 (distributed across 2 servers)

        25 sites sharing 2GB of ram and 2 vCPUs? The vCPU count might work if the CPU is very high performance and the sites aren't high traffic.

        2,000 / 25 = 80mb of memory per site.

        Unless these are static (not wordpress) sites or VERY optimized sites, your specs are extremely low.

        Godaddy offers similiar specs. Don't be like godaddy.

          JohnB agreed it’s extremely low, if you want to host 25 plus websites you need to go for dedicated machines I think.
          I am planing to host 100 accounts containers on 16 core cpu and 192 GB ram for information…

            2GB RAM is nothing... please consider increasing that.

            • Edited

            Kosta 100 sites on 16 DEDICATED cores on a high end CPU should be zippy if the majority aren't hosting busy ecommerce sites.

            I literally like to have at least 1 core (VPS) and 1-2gb memory per site. I routinely halve load times on backend pages and ecommerce pages when moving a site to my hosting.

            Then again I don't charge $5/mo for hosting.

            Anyone hosting with limits like 100mb memory and I assume you've never actually built a site and saw a youtuber saying you could get rich doing this. Like those idiots saying join upwork and use AI to write the code.

            Always possible they are just hosting static (as in no PHP) sites though.

              JohnB I just want to provide transparency and power to my future customers. Basically to show them the hardware and resources they will get. To limit accounts per server to guarantee them consistent uptime and power to burst! Without they to bother me about issues…
              And I am planing big server for our little starting up plans where I can host 500+ accounts but for premiums will be maxed at 100acc per server of 1cpu if 2cpu 200

              8Dweb Thank you for your explanation. I'll create a separate server for Email. You're right regarding backup, I forgot to mention that, usually I attach an external volume/storage to each server for the backups, I do not create a dedicated server for it. On top of that, each of my production droplets are backed up on digital ocean.

              Thank you again 8Dweb it was very helpful

              adil JohnB You're right. I need to increase RAM. I'll allocate 150 MB per website and 2GB for the Database.
              So 25 websites = 25 * 150 + 2,000 ~= 6GB RAM. I'll go with a 4GB RAM and 4GB SWAP server at first, try it out, before increasing RAM, because most of my websites are very optimized, mostly static and heavily cached on Cloudflare.

              8Dweb One more question, the CP server doesn't have to be more than 2GB RAM right? Since it mainly only manages DNS and 1 website

                aymanaaoun the CP server doesn't have to be more than 2GB RAM right

                Yes, the panel itself is really lightweight, and doesn't use much resources.

                  adil Thank you Adil.

                  To transfer websites from my old enhance architecture to my new one, I'll have to do it manually one by one? I know there's the in-built transfer feature, but this will only work for servers under the same CP

                  • adil replied to this.

                    aymanaaoun

                    From Enhance > Enhance, You have to do it manually.

                    From cPanel/Plesk > Enhance, you can use the Website Import feature.

                      adil Manually it is, until 12.1.0 is released:

                      Ability to download an archive backup of a website and import it to another cluster.

                      Thank you adil

                      Write a Reply...
                      Follow @enhancecp