The embodiment of the invention aims to provide a two-layer load balancing method for forwarding a
client request to corresponding
processing equipment by calculating a hash value of a source MAC (
Media Access Control), and a
database firewall
system using the method. Firstly, a hash value is calculated for a
data source MAC (
Media Access Control) from a
client, then a hash result is used for carrying out remainder operation on a node number, so that a current
client message is shunted to a firewall node with a corresponding serial number, two-layer load balancing under
database firewall cluster deployment can be realized, and the reliability, availability and high-
concurrency processing capability of a
system are improved; meanwhile, for a firewall deployed in a bridge mode, a source MAC of a message of a
database server is modified into a bridge port MAC of the firewall on a
client side, so that a switch on the
client side can be prevented from learning the MAC of the
database server to a fixed port, and a scheduling
algorithm is prevented from losing
efficacy; moreover, the
client side port of the firewall filters out the message of which the source MAC is the MAC of the port at the same side of other firewalls, and the
server side port of the firewall filters out the message of which the source MAC is the client side MAC, so that the network loop problem can be avoided.