thirty bees scalability


    Great article, thank you for examples.

    I have a question about technical things:

    One thing to notice is we did not sync the config directory. The reason for this is because we want the database on the remote server to act as a slave database to that server only, because accessing a slave across a network is just going to cause slowness. We did use the same from the master server though, we still want the master write database to be seen as the New York City server. In the of both the Singapore and Frankfurt server we have listed the local host database as the slave. This will allow slaved database requests to come from the database on the server, speeding things up.

    Next what we did was used MySQL replication to replicate the master database from New York City to both of the remote servers. Since we are not getting to technical, one thing I would like to point out is you need to limit your MySQL connections by ip address, you only want known IP addresses to be able to connect to your database.

    @lesley may you elaborate how you did setup the database?
    Do you use some panel, like Webmin/Virtualmin or Cpanel or you do it manually?

    May you send some further details or something to read?

    1. Why Cloudflare? not eg. Amazon Route52 or
      What are benefits?

    Thank you in advance.

  • I set it up manually. I just used Digital Ocean instances with no panel software on them.

    The reason I used cloudflare is because that is what we use for our DNS at thirty bees, I have not used the other services, so I am not sure if they provide GeoIP load balancing. I know the Digital Ocean load balancers do not.

    For the replication this is a good article, The reason I did not want to cover it in depth is the security concerns about opening MySQL up to outside connections. You really need to limit the ip addresses that connect and things like that. I just did not want the article to turn into a security article.

  • Do you use any management panels? which is free for 0,5 M queries or Amazon which is pay as you go.

    Thank you for article. I want to implement geoIP and multiple VPS.

    Regards MySQL just add IP or encrypt the connections, any recommendations?

  • On my personal things and thirty bees things we use plesk. If I were going to use a free panel I would likely use the CentOS one, because I prefer Cent on a server.

    As far as the database, you need to limit the IPS for the MySQL port to just the main server that will be replicating from. I would go against encrypting the connection, because doing that requires you to connect a domain for an ssl cert to be valid. The negotiation time will also add to the replication along with the dns look up. Just using an IP address will be faster.

  • @lesley
    I saw that you use Apache, what about nginx? Is there any ngix confirm template?

    May anyone share it with me? Thank you in advance.

  • I don’t have one. If I run nginx I usually run it as a reverse proxy over apache.

  • Any experience with database clusters? Master-master, multi-master configuration? Galera MariaDB?

    I am trying use Galera MariaDB but it’s so slow or I am doing something wrong.

  • Not really, but I would ask, do you have the need? Or is it just something you are playing with?

  • I want to build a cluster multi master, not using slave database. Master, slave is quite easy. I am wondering if I am doing something wrong or the database is not optimized for such solutions. I was using a digital ocean but ever installation of clean TB there is take so long. Had you the same experiences? 1GBram 1CPU, but now I need to increase the resources.

    I am wondering is someone i using Galera and TB. In presta forum I read yes.

    @lesly do you use few servers for TB? How you manage it? Master-slaves?

  • I honestly have never done it, because the need has never arose. I don’t see your use case for using a system like this, other than just sheer wanting to. I am pretty linear in my thinking and the time I spend with doing things. I generally have an end means for doing it.

  • I want to run my TB on few VPS and use geoDNS.

    One server in Europe, 2 servers in USA, 4th VPS in Asia.

    I am looking for a solution how to create it. I know master-slave solution which lesley wrote.

    Is there anyone have experience with this?

    1. I am thinking about Galera cluster MariaDB.

    Is there anyone who use Galera cluster from MariaDB?

    I have installed it and imported to Galera but it works very slow.

    I am wondering if someone is using Galera and can advice.

    I am wondering if Galera is designed only for HA cluster in e.g 2 local VPS/servers or it could be used with VPS which are in different locations/countries.

    Is there anyone who have TB in few VPS and can share with his knowledge. How to set up, what do you use etc?

    Thank you in advance.

  • @michael We had configured Galera cluster in combination with GlusterFS for shared /html folder, it run well if you have it on SSD’s. We did not setup on VSP, it was on our local servers. We end up removing this setup, due to auto increment. Galera controls the auto increment for each server in cluster. Issue is all your ID’s ( Customer, login or product ) will be generated randomly based on which server is actively writing to database. If you do not care for the random ID numbers, then Galera works well.

  • @KD is there any other solutions which is worth to consider?
    Maybe other clusters or solutions?

    Any workaround for auto increment in Galera?

  • @michael VMware cluster is another solution, but it is not free.

    I don’t think TB or Prestashop has any solution for auto increment. We are too waiting if there is way to separate auto increment only on server level, so that it dose not affect database tables or to any software in use. Some how magento has manage to fix this issue by installing a hot-fix patch.

  • Just out of curiosity how big are the shops you are scaling in this manner? Like order volume and things like that.


Looks like your connection to thirty bees forum was lost, please wait while we try to reconnect.