负载均衡有关问题 高分求解
负载均衡问题 高分求解
有四台web服务器使用了负载均衡
四台db服务器也使用率负载均衡
我想自己写个东西
检测两个负载均衡连接的八台服务器是否可以连接,
因为有的时候其中有一两台服务器挂掉了
但是我不知道,
所以想写一个东西来手动检测
------解决方案--------------------
你负载均衡的技术也自己实现的? 如果不是 你使用的那个肯定有提供这样的功能
------解决方案--------------------
检查他是否活着看他ping的通不啊,不晓得行不行获取用socket通信试试
------解决方案--------------------
搭建个监控的机器cacti
------解决方案--------------------
apache的负载均衡采用反向代理实现,apache有个扩展模块mod_proxy就是专门做这个的。配置完毕以后,apache会自己搞定负载均衡的事情,PHP端不需要管任何事情,至于后端服务器挂了,可以采用其他的监控软件进行监控。一般是采用snmp协议的,比如楼上有人提到的cacti。
mysql的负载均衡,首先要设置多台mysql的replication,一主多从(一写多读),mysql软件包里面有个mysql_proxy是用来代理这些后端的各台mysql的,它可以将读写分离开来,并有多种负载均衡的模式。同理配置完毕后PHP也不需要管任何事情,只需要把默认的3306端口改成mysql_proxy的4040端口即可。监控同理。
------解决方案--------------------
lz了解下nginx, 负载均衡nginx挺好用的
Nginx 简单的负载均衡配置示例[原创] http://blog.s135.com/post/306/
------解决方案--------------------

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics











MySQL and phpMyAdmin are powerful database management tools. 1) MySQL is used to create databases and tables, and to execute DML and SQL queries. 2) phpMyAdmin provides an intuitive interface for database management, table structure management, data operations and user permission management.

In MySQL, the function of foreign keys is to establish the relationship between tables and ensure the consistency and integrity of the data. Foreign keys maintain the effectiveness of data through reference integrity checks and cascading operations. Pay attention to performance optimization and avoid common errors when using them.

The main difference between MySQL and MariaDB is performance, functionality and license: 1. MySQL is developed by Oracle, and MariaDB is its fork. 2. MariaDB may perform better in high load environments. 3.MariaDB provides more storage engines and functions. 4.MySQL adopts a dual license, and MariaDB is completely open source. The existing infrastructure, performance requirements, functional requirements and license costs should be taken into account when choosing.

Safely handle functions and regular expressions in JSON In front-end development, JavaScript is often required...

SQL is a standard language for managing relational databases, while MySQL is a database management system that uses SQL. SQL defines ways to interact with a database, including CRUD operations, while MySQL implements the SQL standard and provides additional features such as stored procedures and triggers.

Display and processing of percentage numbers in Java In Java programming, the need to process and display percentage numbers is very common, for example, when processing Excel tables...

MySQL is suitable for rapid development and small and medium-sized applications, while Oracle is suitable for large enterprises and high availability needs. 1) MySQL is open source and easy to use, suitable for web applications and small and medium-sized enterprises. 2) Oracle is powerful and suitable for large enterprises and government agencies. 3) MySQL supports a variety of storage engines, and Oracle provides rich enterprise-level functions.

Apache remains important in today's technology ecosystem. 1) In the fields of web services and big data processing, ApacheHTTPServer, Kafka and Hadoop are still the first choice. 2) In the future, we need to pay attention to cloud nativeization, performance optimization and ecosystem simplification to maintain competitiveness.
