The invention discloses a self-adaptive two-way
traffic shaping method and
system suitable for a
service grid, and relates to the technical field of
network security, the
system can continuously perceive the change of a service state based on a
metadata collection mechanism of a time window, and a configuration file of a shaping strategy is dynamically updated so as to realize the self-adaptive two-way
traffic shaping of the
service grid. According to the method and the
system, rapid
adaptation to scenes such as new service online and traffic
mode change is realized, service traffic characteristics are analyzed through
dynamic clustering, key services can be automatically identified, an optimal shaping strategy is formed, accurate distribution of network resources is realized, and the problem of bandwidth waste or insufficient key service resources caused by a traditional fixed strategy is effectively avoided. A sending / receiving double-
agent architecture is adopted, and cooperative shaping is implemented at two communication ends. The sending end marks the shaping traffic through the head identifier, and the receiving end significantly reduces the
impact of the burst traffic on the system through the differential
processing of intelligent recombination and virtual / real requests, and improves the stability and reliability of communication between services.