**Hello everybody ,
I making SaaS app like Shopify and ecwid , user create store within 10 mins , once he register he get automatic subdomain with SSL and can add products and payment methods, categories ... etc.
We use Laravel + Mysql + Apache + Cpanel with dedicated server . We have dedicated server with (AMD Ryzen™ 7 3700X,64GB RAM) with Centos 7 + WHM/CPANEL
App now it almost done and it is in test stage . Currently user gets subdomain automatically but if user needs to add his custom domain we add this domain manually as addon domain in app cpanel account or automatically via Cpanel API . I see that when I add one addon domain Apache httpd.conf size increases every store can add up to 5 domains.
For example currently we have 20 addon domains so we httpd.conf size = 144KB if addon domains increased to 200 this means httpd.conf size will be 1440KB (1.2 MB) if addon domains increased to 2000 this means httpd.conf size will be 14400KB (14 MB) if addon domains increased to 10,000 this means httpd.conf size will be 72000KB (72 MB) this mean if we have 10k domains and 10,000 visitor at same time it will request httpd.conf which is 72 MB about 10,000 times it will make server down or very slow .
1.- Am I right with my calculations?
2.- If I decided to make load balance this will solve the problem ? (consider that httpd.conf will be have same addon domains for all server in our network )
3.- If we used Nginx this will solve the problem ?
4.- What is the best server for this type of apps (Nginx or Apache ) ?
thanks**