Forums OroPlatform OroPlatform – How do I? Questions Horizontal Scaling Arquitecture

This topic contains 6 replies, has 4 voices, and was last updated by  Rodolfo 2 years, 2 months ago.

  • Creator
  • #30430



    I’m planning to play around with horizontal scaling architecture and Oro Platform. The idea is move sessions config to a Redis Server and create a LoadBalancer (HAProxy) in the front of some webservers running the same application.

    I’m not sure how some oro commands will deal if running the same application in multiple servers. For example oro:cron:tracking:parse or job queue.

    Anyone have experience or would like to share some ideas about setting this kind of architecture?

    Thank you,

Viewing 6 replies - 1 through 6 (of 6 total)
  • Author
  • #30431

    Ivan Klymenko

    Hi Rodolfo,
    let me share our experience in creating multinode instance of the OroCRM.
    So, If you want to scale the application based on the Oro Platform we would recommend to follow next key points:
    – app/cache shared between web nodes using NFS sharing
    – annotations, metadata, ACL etc stored in Redis (PhpRedis or Predis), except Twig caches which will be shared using NFS
    – for attachments use AwsS3/AmazonS3/FTP/SFTP/MongoGridFS/Dropbox as storage and chache them with the APC using cache adapter which allows to cache other adapters.

    As for job queue, you should not have issues with it since it stores the queue in MySQL which will be based on the different node, so all web nodes will know the actual state for each job.

    Soon we will add the article to our documentation where will be described how to configure scaling environment for the applications based on the Oro Platfrom.



    Hi @iklymenko

    Thanks for your reply.

    1) Do I really need an app/cache shared if the idea is run the same application in all webservers? (I’m thinking in only lock the system while the deployment process runs)

    2) What do you recommend to add annotations/metadata stored in Redis? How about SncRedisBundle ?

    3) In order to add the attachments to Amazon S3 for example, is editing KnpGaufretteBundle the right way to configure it?

    4) If I configure the AttachmentBundle + KnpGaufretteBundle, is it going to take care of the Image Thumbnails as well?



    Hi @rbandeira.

    1) Actually if you do not like folder sharing, you can avoid it. But in such case you will have to change the storage of maintenance_lock file, as by default it’s in a cache folder. Also on any deployment, entity managements changes, updates etc. you will have to synchronize caches among nodes.
    2) Yes, It will be in recommendation in scaling doc.
    3) Yes, we use KnpGaufretteBundle for attachments, just change configuration for your needs.
    4) Image Thumbnails are stored in web folder, so each web node will generate own thumbnails. It’ll be described in doc too.



    Hi @alexander

    Thank you for your reply. I’ll make some tests this week and will let you know the results.

    Looking forward for this scaling doc, maybe I can share my experience as well.


    Dima Soroka

    Thanks @Rodolfo, feel free to participate in PR review.



    Thank you!
    I decided to use HAProxy as loadbalancer instead of nginx as the PR suggests.

    orocrm multiserver

    Redis Master

    I decided to use Amazon S3 and KnpGaufretteBundle config but still facing some problems to put this last step working.

    Anyways, thank you guys!

Viewing 6 replies - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.