Chinaunix首页 | 论坛 | 博客
  • 博客访问: 972885
  • 博文数量: 99
  • 博客积分: 3306
  • 博客等级: 中校
  • 技术积分: 1238
  • 用 户 组: 普通用户
  • 注册时间: 2009-04-21 10:14
文章分类

全部博文(99)

文章存档

2012年(37)

2011年(56)

2010年(6)

分类: LINUX

2011-09-19 12:18:49

直接在centos上使用redhat的piranha 来完成负载均衡其实相对使用keepalived还要简单一些的

  1. serial_no = 41
  2. primary = 192.168.1.200
  3. service = lvs
  4. backup_active = 0
  5. backup = 0.0.0.0
  6. heartbeat = 1
  7. heartbeat_port = 539
  8. keepalive = 6
  9. deadtime = 18
  10. network = direct
  11. debug_level = NONE
  12. virtual {
  13. active = 1
  14. address = 192.168.1.219 eth1:1
  15. vip_nmask = 255.255.255.128
  16. port = 80
  17. send = "HEAD / HTTP/1.0\r\n\r\n"
  18. expect = "HTTP/1.1 200 OK"
  19. use_regex = 0
  20. load_monitor = none
  21. scheduler = wlc
  22. protocol = tcp
  23. timeout = 5
  24. reentry = 15
  25. quiesce_server = 0
  26. server p1.test.net {
  27. address = 192.168.1.191
  28. active = 1
  29. port = 80
  30. weight = 1
  31. }
  32. server p2.test.net {
  33. address = 192.168.1.134
  34. active = 1
  35. port = 80
  36. weight = 1
  37. }
  38. }
  39. virtual nginx.test.net_lvs {
  40. active = 1
  41. address = 192.168.1.220 eth1:2
  42. vip_nmask = 255.255.255.128
  43. port = 80
  44. send = "GET / HTTP/1.0\r\n\r\n"
  45. expect = "HTTP"
  46. use_regex = 0
  47. load_monitor = none
  48. scheduler = wlc
  49. protocol = tcp
  50. timeout = 6
  51. reentry = 15
  52. quiesce_server = 0
  53. server tb1.test.net {
  54. address = 192.168.1.197
  55. active = 1
  56. port = 80
  57. weight = 1
  58. }
  59. server tb2.test.net {
  60. address = 192.168.1.205
  61. active = 1
  62. port = 80
  63. weight = 1
  64. }
  65. }
Realserver上的配置和使用其他方式配置没有任何区别的。


阅读(953) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~