3

We currently run magento enterprise on a single EC2 AWS instance with an ELB out front and MySQL RDS. We are looking to move toward a distributed load balanced environment with two magento EC2 instances so we can handle downtime and more volume. Our ELB is setup to do round robin distribution.

My primary concern is what to do with the admin. From what I've read it sounds like this should run on a single server to ensure the cron and observers only execute in one location. Some put it on an alternate server instead (we don't have that luxury). What are the recommendations for only running the admin on one of the two servers?

5
  • Are you going to do a NFS mount for your content or sync with Lysnc? Commented Sep 3, 2014 at 16:11
  • Yes, we've run environments up to 10s instances, you need a master regardless whether it is a dedicated admin or one of the web servers. How you architect it is pretty important, there are many ways to do it, but running admin on the master is fine as long as you don't have heavy load crons (we are delta processing 100s thousands to millions products per day so need separate batch). It all comes down to usage. There are no correct answers, only experience which are the best choices for a specific situation. Sounds like a pretty standard mini-cluster - the base ami is also pretty important.
    – user2935
    Commented Sep 3, 2014 at 17:10
  • We are not NFS mounting our content. Media storage is in the database and we're going to use AWS memcached for sessions. Thanks you for the suggestions!
    – Tom
    Commented Sep 3, 2014 at 18:42
  • Media storage is in the database - no. memcached for sessions - no redis. Sounds like whoever is designing the architecture is not very experienced.
    – user2935
    Commented Sep 3, 2014 at 20:56
  • No, I'm not extremely experienced with Magento. We're looking for the fastest and simplest path to distributed and load balanced environment and will make improvements from there. I'm looking for input for this reason. If you have suggestions for a relatively low volume, higher api usage site, then by all means, please provide some suggestions.
    – Tom
    Commented Sep 8, 2014 at 13:03

1 Answer 1

0

I would advise that you run the admin on a subdomain which is bound at the ELB to just one of the boxes. Otherwise set a flag that all traffic from a certain IP or with a certain request header gets bound to just one of the boxes.

Or, you know, you can go the old fashioned route and just edit your host file. :-D

3
  • So, your suggestion is to route all traffic to an address like: admin.mydomain.com goes to one box while traffic to mydomain.com gets distributed, correct? What do you do about controlling the admin to only run observer and cron on that single instance?
    – Tom
    Commented Sep 3, 2014 at 16:53
  • Correct. You don't need to worry about the async nature of the two environments, just set Magento Cron to only run on the "master" box. Or on both. There's no harm in it running frequently.
    – philwinkle
    Commented Sep 3, 2014 at 16:55
  • We'll only want it to run on one, we'd prefer to not have the indexing and other custom jobs we have added to it to be running simultaneously on two boxes. Thanks for the strategy input!
    – Tom
    Commented Sep 3, 2014 at 18:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.