Jump to content
thirty bees forum

Recommended Posts

Posted

https://thirtybees.com/blog/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 settings.inc.php from the master server though, we still want the master write database to be seen as the New York City server. In the dbslaveserver.inc.php 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 ns1.com? What are benefits?

Thank you in advance.

Posted

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, https://www.digitalocean.com/community/tutorials/how-to-set-up-master-slave-replication-in-mysql 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.

Posted

Do you use any management panels?

https://ns1.com/pricing#managed 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?

Posted

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.

Posted

@lesley https://thirtybees.com/developer-blog/installing-thirty-bees-on-digital-ocean/ 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.

  • 2 weeks later...
Posted

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.

Posted

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?

Posted

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.

Posted

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.

Posted

@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.

Posted

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

Any workaround for auto increment in Galera?

Posted

@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.

  • 1 year later...
Posted

I am sorry @lesley I did not saw that you have answered.

 

I was testing more for tests and SEO. I get more mess then benefits.

Like Learn amazon route53, use Letsencrypt and multi servers, some problems with delays.

I keep tow separate database but I give extra work to make a double work on BO.

Now I want to change it.

Sync it maybe try Master-Slave or something else.

 

Have you run for longer time using one database as master and others like slave?

Any further info or experiences after few years later after the article https://thirtybees.com/blog/thirty-bees-scalability/  ?

 

What are your performances after few years of using Master Slaves?

Any problems, loose of data?

 


 

 

 

 

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...