Hi guys,
I was just wondering what would be the best practice for setting up multiple servers / machines behind a load balancer which would be synchronized of course.
I have a website which requires this kind of setup because of the high traffic. We are using Magento 2.2 community edition. My team did all the optimizations for performance that we could think of, varnish and redis are there, we are using CDN, cache warmer and so on. The primary and secondary databases are on different machines as well.
Server is using nginx and apache configuration with a load balancer.
So basicaly we did as much as we could but one problem still occurs. Whenever we do a deploy on the main server one of the other servers starts causing problems because of file cloning I suspect.
We are using rsync command to sync the files from the main server to the others.
Are there any better ways to do the cloning of the files?
What is your experience?
What would be the best practice solution for this problem?
Thank you!
Solved! Go to Solution.
Hi,
This is a really old post. We have done many of these since. Mostly on Commerce, on both Nginx and Apache.
Here is what we usually do:
There are two options in a multisite environment:
When there is a multisite environment you could have separate Redis & Varnish configured for each site.
A load balancer is used in these cases:
I'm really amazed that not many are using it as it is really necessary for bigger websites. We are using it for almost every Magento Commerce project.
Not sure if there is any documentation, but here, I wrote a blog post on Magento 2 Admin on a Separate (Sub)Domain in a Multi-Site Environment
Not sure if this helps but I hope so.
scale just php backend, not the whole system...
You could use GlusterFS or any other distributedFS. Where do you experience a bottleneck under high load?
@milos.z wrote:Hi guys,
I was just wondering what would be the best practice for setting up multiple servers / machines behind a load balancer which would be synchronized of course.
I have a website which requires this kind of setup because of the high traffic. We are using Magento 2.2 community edition. My team did all the optimizations for performance that we could think of, varnish and redis are there, we are using CDN, cache warmer and so on. The primary and secondary databases are on different machines as well.
Server is using nginx and apache configuration with a load balancer.
So basicaly we did as much as we could but one problem still occurs. Whenever we do a deploy on the main server one of the other servers starts causing problems because of file cloning I suspect.
We are using rsync command to sync the files from the main server to the others.
Are there any better ways to do the cloning of the files?
What is your experience?
What would be the best practice solution for this problem?
Thank you!
Hello,
Did you ever get this figured out? We are trying to do the same kind of setup (multiple frontend servers running Magento behind a load balancer) and would love to know if there are best practices or a document on how to properly configure this. It seems like something that not many people are doing.
Hi,
This is a really old post. We have done many of these since. Mostly on Commerce, on both Nginx and Apache.
Here is what we usually do:
There are two options in a multisite environment:
When there is a multisite environment you could have separate Redis & Varnish configured for each site.
A load balancer is used in these cases:
I'm really amazed that not many are using it as it is really necessary for bigger websites. We are using it for almost every Magento Commerce project.
Not sure if there is any documentation, but here, I wrote a blog post on Magento 2 Admin on a Separate (Sub)Domain in a Multi-Site Environment
Not sure if this helps but I hope so.
Don't forget to share pub/static if you merge/combine css/js files. May also want to consider sharing "var" so you can place site into maintenance mode faster, di:compile sharing, etc...
I have a website which requires this kind of setup because of the high traffic. We are using Magento 2.2 community edition. My team did all the optimizations for performance that we could think of, varnish and redis are there, we are using CDN, cache warmer and so on. The primary and secondary databases are on different machines as well. Tutuapp 9Apps ShowBox