SDN controller is the core of SDN network and one of the key factors to determine the efficiency of SDN network.The main way for SDN controller to manage network is to deal with all kinds of messages sent by switching devices, so how to deal with messages efficiently becomes the key to design SDN controller.Based on the characteristics of messages in SDN network, this paper designs an efficient message processing mechanism based on queue tree: the timely response of the controller to key messages is realized by classifying and processing different types of messages; the workload of the controller is greatly reduced by merging similar messages; and the workload of the controller is realized by adjustable thread pool. The controller adaptively processes different messages.Nearly two-thirds of the world’s total workload will be processed in the cloud in 2008. Data Center (DC) will be the source or destination of most Internet traffic.Among all the traffic generated by the data center, the internal traffic accounts for 76% of the total traffic in the data center.
The main activities are data exchange between storage and virtual machines.Therefore, the future Internet will be a cloud computing data center as the core network.In the existing data center, each service occupies resources independently and has no resource mobility requirements. Therefore, each service network is physically isolated and self-contained.The network scalability constructed by this way is very limited. It can only be replaced vertically but can not be expanded horizontally, which results in the bottleneck of system performance.Often, thermostatic element in order to meet the 1% peak time traffic demand, 99% of the machines have to participate in the work, and the efficiency of each machine is often less than 20%.Because of the complex switches, terminals, routers and other devices in traditional Internet, a large number of closed and proprietary internal interfaces and protocols are used in these network devices; therefore, the flow control in traditional network is generally inefficient and the way of “alarm-response” is mostly used, and network services in the existing network. Before responding under network management, it is likely that it has been affected.Because there are a large number of different devices and protocols in traditional network, it is impossible to control all network devices effectively, and the cost of network maintenance remains high, so network management needs a lot of manual configuration.To break this situation, Professor Nick McKeown and others put forward the concept of Software Defined Network (SDN) in 2008.Software Definition Network (SDN) is an architecture that divides traditional network devices into three layers: application, control and data forwarding.As shown in Figure 1, OpenFlow, the core technology of OpenFlow, provides a programmable network management mode by realizing the independence of control and forwarding rights of network devices, so as to flexibly and conveniently control the forwarding of data packets.In the software definition network, the controller obtains the underlying network equipment information through the south-facing interface (OpenFlow protocol), carries on the unified deployment, the centralized management and the flexible control, thus solves the decentralized network equipment management control problem.At the same time, the controller provides a programmable and extensible northbound interface. Functional application software designed according to different requirements can run directly on the controller, and use the controller to update and upgrade the global network equipment.The function of control layer is realized by centralized SDN controller.SDN controller includes two layers of open interfaces: the northward interface is programmable interface, which is oriented to application layer, and the southward interface interacts with forwarding layer through OpenFlow and other protocols.The application layer is composed of software-like applications. Network administrators or system developers only need to pay attention to the logic of the network application, and do not need to pay attention to the details of the underlying implementation.The controller in the control layer mainly configures and manages various network devices in the forwarding layer according to the specific application requirements.Through centralized management of forwarding tables, the controller can control the size and direction of traffic in each link of the network in real time, and then can realize virtualization management of network bandwidth resources and network functional components, from extensive network modules to fine-grained resource pool expansion, so that the utilization rate of network resources can be greatly improved.In general, the forwarding layer only needs to forward data packets based on instructions and policies issued by the control layer.
In this way, the network can flexibly adapt new services or protocols without changing or replacing the hardware of the forwarding layer, which promotes the implementation and deployment of new network technologies and protocols, and improves the flexibility and operability of the network.SDN subverts the existing network architecture, which makes the network evolve from a vertically integrated and closed state to a horizontally integrated, open and fast innovation supporting ecosystem.Since the related concepts were first put forward in the industry in 2009, SDN has attracted tremendous attention and become a research hotspot.Although SDN controllers can greatly improve the utilization of network resources, with the expansion of data centers, SDN controllers still face a major problem: the number of switches and user hosts increases, so that the content of stream tables stored by each switch increases accordingly (theoretically, the flow tables on each switch need to cover the network at most). All the hosts in the switch not only need larger storage capacity and faster query speed for each switch, but also put forward higher requirements for the working efficiency of the controller.Although several SDN controllers have been proposed one after another, due to the constraints of performance and scalability, they can manage some of the network scale and still do not have the ability of commercial operation.Therefore, with the arrival of the big data wave, we urgently need a high-performance SDN controller for cloud computing data center.The main way for SDN controller to manage network is to deal with all kinds of messages sent by switching devices, so how to deal with messages efficiently becomes the key to design SDN controller.Based on the characteristics of messages in SDN network, this paper designs an efficient message processing mechanism based on queue tree: the timely response of the controller to key messages is realized by classifying and processing different types of messages; the workload of the controller is greatly reduced by merging similar messages; and the workload of the controller is realized by adjustable thread pool. The controller adaptively processes different messages.With the improvement of terminal computing and processing capacity and the expansion of network transmission capacity, the information carried by the network is expanding rapidly. The Internet is no longer a network for the purpose of communication, but more towards meeting people’s demand for information, becoming a platform for information carrying and distribution.Because people have diversified demands on information acquisition methods (wired, mobile), information types (data, voice, video), information quality, information security, etc., the Internet has introduced a large number of control protocols to meet various needs and formed a huge control plane.These control protocols depend on specific forwarding protocols in design, and from the point of view of implementation technology, both control plane and forwarding plane run in network devices, which brings great challenges to the expansion of network functions and network management. Traditional network architecture is increasingly unable to meet the needs of enterprises, operators and users.Based on this background, SDN software-defined network is proposed as an important part of SDN software-defined data center.SDN (Software Definition Network) is a new network architecture. Its design idea is to separate the control plane of the network from the data forwarding plane, support centralized network state control, and realize transparency of the underlying network facilities to the upper application.SDN has flexible programming ability, which improves the automation management and control ability of the network unprecedentedly.
It can effectively solve the problems faced by the current network, such as limited expansion of resources, poor flexibility of networking, and difficulty in meeting business needs quickly.Software Definition Network (SDN) is a new network innovation architecture. Its core technology is to separate the control surface of network equipment from the data surface, and flexibly configure network functions through software programs, so that the ability of network automation management and control can be improved unprecedentedly, so that the flexible control of network traffic can be realized. The innovation provides a good platform, which can effectively solve the problems faced by the current network system, such as limited expansion of resources, poor flexibility of networking, difficulty in meeting business needs quickly, and facilitate network upgrading and adapting to the needs of various new services.The SDN controller is responsible for the control plane of the whole network, undertaking physical network and upper application.At present, there are dozens of manufacturer’s open source controllers in the market, but the message queue of these controllers is uncontrollable, not flexible enough, and the scalability is not good enough.Most of the existing SDN controllers usually use a fixed message queue mode, which is not adjustable and can not make a special queue arrangement for a single message.In view of this, how to find a better message queue management scheme for SDN controller has become an urgent problem for technical personnel in this field.Network heartbeat and traffic monitoring messages: mainly Echo messages in OpenFlow protocol and traffic statistics for switches, ports or flow tables.The characteristics and importance of these three types of messages are quite different.
The number of the first kind of messages is the smallest, but the importance is the greatest. It needs the controller to make the corresponding in time, otherwise it will affect the communication of the whole network.The number of the second kind of messages will be more, and the communication behavior of each host in the network will cause the controller to receive the corresponding messages.If a host sends a large number of packages, the controller may be blocked.However, it is less important than the first kind of message, because if the controller is not processed in time, it will only affect the communication of the host.The third kind of message is not many, and its importance is the lowest. It can be seen as the monitoring message of the network. If the message is not processed in time, it will not affect the communication of the network.Therefore, the message processing mechanism of SDN controller faces the following two challenges: first, it is necessary to ensure that the most important first-class messages are processed in time under any circumstances; second, it is necessary to have an efficient classification, merging and caching mechanism for the second-class messages in order to cope with the large number of messages brought by DDos attacks. 。According to the characteristics of the messages analyzed in 3.1, we design a message queue tree as shown in Figure 2.There are two types of objects in this message queue tree: message type node (MsgTypeNode) and message queue (MsgQueue).Message type nodes represent a particular type of message. According to the type of message and the inclusion relationship between them, they constitute the parent-child relationship.Each message type node has a corresponding message queue, which stores the corresponding message or sub-queue of that type.The reason for setting up subqueues is that some messages can be merged.For example, ARP_Request for the same host address only needs to be processed once.Each message type node corresponds to a corresponding message processing thread Msg_Handler.PushMsg is used to process a message.This function should first determine whether the current message can be placed in a child node, and if there are no or all of the child nodes that do not match the message, the message should be placed in its own message queue.
When you put it in a message queue, you also need to determine whether there are subqueues.If there are sub-queues, the corresponding sub-queues should be selected according to the sub-queue rules.GetMsg is used to return a message to the corresponding Msg_Handler for processing.The GetMsg interface should support two parameters: IfDel and MSg.IfDel indicates whether deletion from the queue is necessary after the corresponding message is returned.The Msg parameter represents the properties of the message specified to be returned.The existence of each message type node depends on whether there is a corresponding Msg_Handler.When the system is initialized, all supported Msg_Handlers should be registered in the system to submit the type information of the messages they support.The SDN controller determines the message queue tree based on the registration information submitted by all Msg_Handler.The SDN controller generates a certain number of threads for each message processing Msg_Handler.These threads monitor a common semaphore.When a message type node adds a message to its own queue, it cancels the message by increasing the semaphore value to notify all Msg_Handler threads.Figure 3 shows the message processing architecture of SDN controller based on queue tree.The SDN controller constructs a queue tree according to the message type, and different types of messages are put into different queues on the queue tree according to the rules.According to the message characteristics of a message, a corresponding handler is established for the message, and the message characteristics of the message include the message type; the handler includes the add_msg interface and the msg_handler interface; where the add_msg interface is used to receive the message and encapsulate and add the message to the message queue; and the msg_handler interface is used to pair the message with the message queue. The message is processed.In one embodiment, the message characteristics also include a protocol version.In one embodiment, the message and the corresponding handler are managed by a registration mechanism, with the message characteristics of the message as keywords and the corresponding handler as values.Protocol message and specific message processing handler adopt registration mechanism, which is flexible and controllable, and can only register protocol messages that need to be processed.In one embodiment, each message queue corresponds to a separate thread pool in which encapsulated messages are processed.The thread pools of each message queue are independent of each other and do not interfere with each other, which greatly improves the concurrency of message processing.The message queue includes sub-queues, and messages are distinguished by protocol subtypes or message destination addresses or custom fields as keywords to be encapsulated in different sub-queues.In one embodiment, the encapsulated message has the same encapsulation structure, which includes message body, protocol version, message type and corresponding handler.In one embodiment, a message queue includes multiple message types.The SDN controller receives the message and determines the corresponding handler according to the message characteristics.
The handler’s add_msg interface is invoked to encapsulate the message and add it to the message queue.In one embodiment, the message queue includes a subqueue, and the Handler’s add_msg interface distinguishes messages by protocol subtypes or message destination addresses or custom fields as keywords to encapsulate them into different subqueues.The message is an OpenFlow message.In one embodiment, the SDN controller receives messages in EPOLL mode.EPOLL was proposed in the 2.6 kernel as an enhanced version of previous selects and polls.Compared with select and poll, EPOLL is more flexible and has no descriptor limitation.EPOLL uses one file descriptor to manage multiple descriptors, and stores the event of user relationship file descriptor in an event table of the kernel, so that only one copy is needed in user space and kernel space.The encapsulated message is extracted from the message queue, and the encapsulated message is processed by calling the msg_handler interface of the handler corresponding to the encapsulated message.In one embodiment, each thread pool retrieves the message (CMsg) from the corresponding message queue, then retrieves the associated Handler from CMsg, and finally processes the message through the handler’s msg_handler interface.Each Queue’s thread pool is independent of each other and does not interfere with each other, which greatly improves the concurrency of message processing.SDN controller is the core of SDN network and one of the key factors to determine the efficiency of SDN network.The main way for SDN controller to manage network is to deal with all kinds of messages sent by switching devices, so how to deal with messages efficiently becomes the key to design SDN controller.Based on the characteristics of messages in SDN network, this paper designs an efficient message processing mechanism based on queue tree: the timely response of the controller to key messages is realized by classifying and processing different types of messages; the workload of the controller is greatly reduced by merging similar messages; and the workload of the controller is realized by adjustable thread pool. The controller adaptively processes different messages.