Welcome to the Linux Foundation Forum!

Using keepalived load balancer for the MySQL Cluster

Posts: 42
edited August 2012 in Network Management

Hello Everyone,

I have a working MySQL cluster which is based on 2 nodes.

Now on my 3rd server i want to use it as a Load balancer for the MySQL cluster.

As, i do not have that much experience in load balancing part so i Google for it and i finally made my configuration file.

Kindly take a look at the attached config file.

And please tell me if i am missing some parameters.

Thanks,

usmangt

Comments

  • Posts: 42
    Since, in the forum the file attachment is not working so i am pasting it in here
    1. global_defs {
    2. router_id OX
    3. }
    4.  
    5. vrrp_sync_group OX_GROUP {
    6. group {
    7. OX_GOUP
    8. }
    9. }
    10.  
    11. vrrp_instance OX_VRRP {
    12. state BACKUP
    13. interface eth0
    14. garp_master_delay 10
    15. virtual_router_id 10
    16. priority 101
    17. nopreempt
    18. advert_int 1
    19. authentication {
    20. auth_type PASS # Simple 'PASS' can use
    21. auth_pass example # example password '1234'
    22. }
    23. virtual_ipaddress {
    24. 10.10.10.249/24 brd 10.10.10.255 dev eth0 # virtual service ip 10.10.10.249
    25. }
    26. virtual_ipaddress_excluded {
    27. }
    28. }
    29.  
    30. virtual_server_group OX_HTTP {
    31. 10.10.10.249 3306 # virtual ip and port 3306
    32. }
    33.  
    34. virtual_server group OX_HTTP {
    35. delay_loop 3
    36. lvs_sched rr
    37. lvs_method DR
    38. protocol TCP
    39. virtualhost 10.10.10.249
    40.  
    41. real_server 10.10.10.187 3306 {
    42. weight 1
    43. inhibit_on_failure
    44. TCP_CHECK {
    45. connect_port 3306
    46. connect_timeout 10
    47. }
    48. }
    49.  
    50. real_server 10.10.10.189 3306 {
    51. weight 1
    52. inhibit_on_failure
    53. TCP_CHECK {
    54. connect_port 3306
    55. connect_timeout 10
    56. }
    57. }
    58. }

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Categories

Upcoming Training