<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE article  PUBLIC "-//NLM//DTD Journal Publishing DTD v3.0 20080202//EN" "http://dtd.nlm.nih.gov/publishing/3.0/journalpublishing3.dtd"><article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" dtd-version="3.0" xml:lang="en" article-type="research article"><front><journal-meta><journal-id journal-id-type="publisher-id">IJCNS</journal-id><journal-title-group><journal-title>International Journal of Communications, Network and System Sciences</journal-title></journal-title-group><issn pub-type="epub">1913-3715</issn><publisher><publisher-name>Scientific Research Publishing</publisher-name></publisher></journal-meta><article-meta><article-id pub-id-type="doi">10.4236/ijcns.2017.105B026</article-id><article-id pub-id-type="publisher-id">IJCNS-76620</article-id><article-categories><subj-group subj-group-type="heading"><subject>Articles</subject></subj-group><subj-group subj-group-type="Discipline-v2"><subject>Computer Science&amp;Communications</subject></subj-group></article-categories><title-group><article-title>
 
 
  Distributed Middlebox Placement Based on Potential Game
 
</article-title></title-group><contrib-group><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Yongwen</surname><given-names>Li</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref></contrib><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Zhiyi</surname><given-names>Qu</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref></contrib></contrib-group><aff id="aff1"><addr-line>School of Information Science &amp;amp; Engineering, Lanzhou University, Lanzhou, China</addr-line></aff><pub-date pub-type="epub"><day>26</day><month>05</month><year>2017</year></pub-date><volume>10</volume><issue>05</issue><fpage>264</fpage><lpage>273</lpage><history><date date-type="received"><day>May</day>	<month>3,</month>	<year>2017</year></date><date date-type="rev-recd"><day>Accepted:</day>	<month>May</month>	<year>23,</year>	</date><date date-type="accepted"><day>May</day>	<month>26,</month>	<year>2017</year></date></history><permissions><copyright-statement>&#169; Copyright  2014 by authors and Scientific Research Publishing Inc. </copyright-statement><copyright-year>2014</copyright-year><license><license-p>This work is licensed under the Creative Commons Attribution International License (CC BY). http://creativecommons.org/licenses/by/4.0/</license-p></license></permissions><abstract><p>
 
 
   
   In this paper, we analyse the deployment of middlebox. For a given network information and policy requirements, an attempt is made to determine the optimal location of middlebox to achieve the best performance. In terms of the end-to-end delay as a performance optimization index, a distributed middlebox placement algorithm based on potential game is proposed. Through extensive simulations, it demonstrates that the proposed algorithm achieves the near-optimal solution, and the end-to-end delay decreases significantly. 
  
 
</p></abstract><kwd-group><kwd>Middlebox Placement</kwd><kwd> Performance Optimization</kwd><kwd> Potential Game</kwd><kwd> Matching Graph</kwd><kwd> Distributed Algorithm</kwd></kwd-group></article-meta></front><body><sec id="s1"><title>1. Introduction</title><p>In order to manage users’ communication, improve safety and performance the operators widely deploy middlebox services in their own network, such as deep packet inspection (DPI), firewall, proxy, intrusion detection and prevention (IDP), network address conversion (NAT), etc. The service chain is defined as a middlebox sequence that should be traversed in a pre-specified order. Recently, the academic and industrial domains have done a lot of efforts on how to implement the service chain efficiently [<xref ref-type="bibr" rid="scirp.76620-ref1">1</xref>] [<xref ref-type="bibr" rid="scirp.76620-ref2">2</xref>] [<xref ref-type="bibr" rid="scirp.76620-ref3">3</xref>]. According to the predefined sequence of strategies, the routing is transmitted from one middlebox to another. However, no matter what program is used to achieve the service chain, there will be such a problem that in the network where the deployment of middlebox is placed in order to make the performance of the overall strategy for the implementation of overall strategy.</p><p>This paper mainly solves the problem of middlebox deployment. In particular, according to the traversal sequence of the policy, we aim to find the best location of the deployment of middlebox. Instead of the shortest path passing from the entry point to the exit point, in which traffic route from the entrance to a number of middlebox one by one, and then exit the outlet. Obviously, the overall path will be exaggerated, which will result in a long end-to-end delay. Therefore, in this work, we consider the total end-to-end delay as the optimization index of the policy implementation, which is also adopted in [<xref ref-type="bibr" rid="scirp.76620-ref4">4</xref>], and use this optimization index to evaluate the performance of proposed middlebox deployment scheme. In the network function virtualization (NFV) [<xref ref-type="bibr" rid="scirp.76620-ref5">5</xref>], the problem is more meaningful since you can easily move one form of middlebox software running on commodity hardware. In NFV, you can use the deployment algorithm more often to determine the best location of middlebox periodically.</p><p>In this paper, a distributed middlebox placement based on potential game is proposed to decrease computation complexity. Through the definition of the service queue middlebox for the participants in the game, to minimize the total end-to-end delay as the goal, we design the game strategy and utility function, give the potential game proved that, and according to the definition of ordinal function and analysis of change, it can be proofed that Nash equilibrium point exists in the model. Based on this potential game model, a distributed algorithm is proposed. Through numerical results, the proposed distributed algorithm can reduce the system end-to-end delay significantly compared with the random placement. On average, the end-to-end delay will be reduced by 34%. In addition, it shows that the performance of the proposed distributed algorithm obtains the near-optimal solution.</p></sec><sec id="s2"><title>2. Methodology</title><sec id="s2_1"><title>2.1. System Model</title><p>These <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x2.png" xlink:type="simple"/></inline-formula> is utilized to express underlying network, where S denotes the switch set, E denotes the link set. For each switch<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x3.png" xlink:type="simple"/></inline-formula>, <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x4.png" xlink:type="simple"/></inline-formula>represents the available resource of switch <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x5.png" xlink:type="simple"/></inline-formula> in deploying middlebox, and resource represents the number of available ports in server or the computing resources of the server. In addition, <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x6.png" xlink:type="simple"/></inline-formula>represents the delay from route <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x7.png" xlink:type="simple"/></inline-formula> to route<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x8.png" xlink:type="simple"/></inline-formula>, that is the total delay of all links on the route. Then, a format model is given to describe the strategy. The P is used to describe provision set of policy, the provision of each policy<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x9.png" xlink:type="simple"/></inline-formula>, which is defined as <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x10.png" xlink:type="simple"/></inline-formula> where <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x11.png" xlink:type="simple"/></inline-formula> and <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x12.png" xlink:type="simple"/></inline-formula> denotes input switch and output switch, respectively, <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x13.png" xlink:type="simple"/></inline-formula> represents the data stream of this policy adopted by the i-th middlebox, and <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x14.png" xlink:type="simple"/></inline-formula> represents the number of middlebox of this policy. Further, we use <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x15.png" xlink:type="simple"/></inline-formula> to represent the set of middleboxes to be deployed, and <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x16.png" xlink:type="simple"/></inline-formula> to represent the required resource to deploy middlebox<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x17.png" xlink:type="simple"/></inline-formula>.</p></sec><sec id="s2_2"><title>2.2. Problem Formation</title><p>From the above definition, we need to determine the location of each middlebox. <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x18.png" xlink:type="simple"/></inline-formula>is utilized to represent the deployment scenario of the middlebox. When<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x19.png" xlink:type="simple"/></inline-formula>, it represents that middlebox <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x19.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x20.png" xlink:type="simple"/></inline-formula> connected to switch<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x19.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x20.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x21.png" xlink:type="simple"/></inline-formula>. Otherwise, <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x19.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x20.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x21.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x22.png" xlink:type="simple"/></inline-formula> . Then, the following constraints are obtained.</p><disp-formula id="scirp.76620-formula257"><label>(1)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/76620x23.png"  xlink:type="simple"/></disp-formula><disp-formula id="scirp.76620-formula258"><label>(2)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/76620x24.png"  xlink:type="simple"/></disp-formula><disp-formula id="scirp.76620-formula259"><label>(3)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/76620x25.png"  xlink:type="simple"/></disp-formula><p>Condition (1) ensures that each middlebox is only deployed in a switch condition (2) guarantees that the total resource requirements in a local deployment middlebox do not exceed resource performance. Condition (3) indicates that middlebox with special requirements can only be deployed in a specific area.</p><p>a) Induction problem using matching graph</p><p>The main problem of this paper is how to deploy the middlebox to minimize the system delay. This paper mainly uses the matching graph to explain how to deploy middleboxed, as shown in <xref ref-type="fig" rid="fig1">Figure 1</xref>. Where <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x26.png" xlink:type="simple"/></inline-formula> represents the weight of middlebox <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x26.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x27.png" xlink:type="simple"/></inline-formula> located in switch<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x26.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x27.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x28.png" xlink:type="simple"/></inline-formula>, which is defined as sum link delay from the middlebox <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x26.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x27.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x28.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x29.png" xlink:type="simple"/></inline-formula> to the next hop. When the last hop of middlebox q<sub>i</sub> is the end node, the <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x26.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x27.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x28.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x29.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x30.png" xlink:type="simple"/></inline-formula> contains the link delay of starting node to<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x26.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x27.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x28.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x29.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x30.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x31.png" xlink:type="simple"/></inline-formula>. From the above definition, the overall delay of the system is:</p><disp-formula id="scirp.76620-formula260"><label>, (4)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/76620x32.png"  xlink:type="simple"/></disp-formula><p>where the weight <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x33.png" xlink:type="simple"/></inline-formula> is related to the matching of other middleboxes, which are determined by the decision variables<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x33.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x34.png" xlink:type="simple"/></inline-formula>.</p><p>b) Analysis of the reasons for the problem difficulty</p><p>From the above analysis based on matching graph, we can observe that if the matching position of any middlebox <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x35.png" xlink:type="simple"/></inline-formula> changes, and the weight value of other middleboxes may vary with unchanged matching position. The edge weight of the matching graph is influenced by each other, thus it becomes very difficult to obtain the maximum matching problem as shown in <xref ref-type="fig" rid="fig1">Figure 1</xref>. Furthermore, we can see that if middlebx <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x35.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x36.png" xlink:type="simple"/></inline-formula> changes its matching position, then the weight of edges, whose next hop is<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x35.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x36.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x37.png" xlink:type="simple"/></inline-formula>, also changes. Therefore, we modify the definition of weights, and use the growth trend to design distributed algorithm.</p><fig id="fig1"  position="float"><label><xref ref-type="fig" rid="fig1">Figure 1</xref></label><caption><title> Problem model with matching graph</title></caption><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/76620x38.png"/></fig></sec><sec id="s2_3"><title>2.3. Definition of Potential Game</title><p>Potential game (PG) [<xref ref-type="bibr" rid="scirp.76620-ref6">6</xref>] is an effective model for the change of the trend, and the most important one is the definition of utility, the effective policy space and the definition of the optimal policy.</p><p>1) According to the above analysis, the game model is defined as<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x39.png" xlink:type="simple"/></inline-formula>, where <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x39.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x40.png" xlink:type="simple"/></inline-formula> represents the number of game players, <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x39.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x40.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x41.png" xlink:type="simple"/></inline-formula>represents strategy space, and <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x39.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x40.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x41.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x42.png" xlink:type="simple"/></inline-formula> represents network performance of any player. From the above analysis, the utility of middlebox <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x39.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x40.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x41.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x42.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x43.png" xlink:type="simple"/></inline-formula> is related to the start edge and the weight of the next hop edge, so the utility of any player is defined as:</p><disp-formula id="scirp.76620-formula261"><label>, (5)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/76620x44.png"  xlink:type="simple"/></disp-formula><p>Compared with<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x45.png" xlink:type="simple"/></inline-formula>, this definition increases the weight of the edge with the next hop to the middlebox. Here <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x45.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x46.png" xlink:type="simple"/></inline-formula> is the indicative symbol that if<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x45.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x46.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x47.png" xlink:type="simple"/></inline-formula>, <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x45.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x46.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x47.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x48.png" xlink:type="simple"/></inline-formula> , or <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x45.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x46.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x47.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x48.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x49.png" xlink:type="simple"/></inline-formula> .</p><p>2) It is clear that the feasible strategy space of any middlebox <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x50.png" xlink:type="simple"/></inline-formula><sub> </sub>is to select some switch, which also meets the constraint of the switch port capacity.</p><p>Definition 1: The optimal strategy of the participants. The optimal policy for any middlebox <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x51.png" xlink:type="simple"/></inline-formula> is the minimum utility that can be obtained in a feasible space when the location of the other middlebox is not changed, that is</p><disp-formula id="scirp.76620-formula262"><label>(6)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/76620x52.png"  xlink:type="simple"/></disp-formula><p>where n represents middlebox, <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x53.png" xlink:type="simple"/></inline-formula> represents strategy of n, <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x53.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x54.png" xlink:type="simple"/></inline-formula>represents the strategy of other middlebox except n. The above formula represents the best strategy for the current middlebox, which is based on the same location of the other middlebox.</p><p>3) According to the definition of the above utility function and the strategy space, we also need to prove that this game model is a potential game.</p><p>Theorem 1: The game model defined as <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x55.png" xlink:type="simple"/></inline-formula> is a potential game.</p><p>Proof: We first define the ordinal function as</p><p><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x56.png" xlink:type="simple"/></inline-formula>. Then, we prove that any varying in the layout of the</p><p>middlebox will bring a change in its own utility function and change the value of ordinal function with the same trend. Assuming that the layout of a middlebox <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x57.png" xlink:type="simple"/></inline-formula> has changed, from the switch <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x57.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x58.png" xlink:type="simple"/></inline-formula> to switch<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x57.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x58.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x59.png" xlink:type="simple"/></inline-formula>, the utility function of the middlebox varys as follows:</p><disp-formula id="scirp.76620-formula263"><label>(7)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/76620x60.png"  xlink:type="simple"/></disp-formula><p>where <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x61.png" xlink:type="simple"/></inline-formula> represents the delay varying of the edge with <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x61.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x62.png" xlink:type="simple"/></inline-formula> as the starting point and <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x61.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x62.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x63.png" xlink:type="simple"/></inline-formula> represents the delay varying of the edge with <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x61.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x62.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x63.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x64.png" xlink:type="simple"/></inline-formula> as the next hop. Similarly, the ordinal function of the change is shown below:</p><disp-formula id="scirp.76620-formula264"><label>(8)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/76620x65.png"  xlink:type="simple"/></disp-formula><p>where <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x66.png" xlink:type="simple"/></inline-formula> indicates the edge delay of next hop as q<sub>i</sub> for all of the strategies, as the delay of other edge independent of q<sub>i</sub> will not change,<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x66.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x67.png" xlink:type="simple"/></inline-formula>. Therefore, it is proved that the game model defined as <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x66.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x67.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x68.png" xlink:type="simple"/></inline-formula> is a potential game. According to the above definition, it can be concluded that this model exists Nash equilibrium.</p></sec><sec id="s2_4"><title>2.4. Distributed Algorithm</title><p>Based on the above potential game, it can be seen that any middlebox can choose its best strategy to reduce the system delay. The specific algorithm can be depicted extensivley as follows (Algorithm 1):</p><p>In the algorithm, each middlebox selects its best strategy in a random order. In each iteration, the system uniformly randomly chooses one middlebox<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76620x69.png" xlink:type="simple"/></inline-formula>, the selected middlebox obtains its best strategy from Definition 1. If no new strategy is obtained from all middlebox, the stop flag is set to be 0, and the Algorithm 1 ends.</p><p>From the analysis of these algorithms, it can be seen that any middlebox can reduce system latency only considering its utility, therefore, saving the overall</p><disp-formula id="scirp.76620-formula265"><graphic  xlink:href="http://html.scirp.org/file/76620x70.png"  xlink:type="simple"/></disp-formula><p>Algorithm 1. Distributed algorithm based on potential game.</p><p>optimization of the system overhead, and overcome the convergence problem of heuristic algorithm (such as reference in the literature of the simulated annealing algorithm [<xref ref-type="bibr" rid="scirp.76620-ref4">4</xref>]).</p></sec><sec id="s2_5"><title>2.5. Proof of Convergence</title><p>Theorem: the proposed distributed algorithm certainly converges to the Nash equilibrium point.</p><p>Proof: Each a iteration of the algorithm generates a new strategy by adopting the best response strategy. Since there are only a limited number of middlebox, the maximum number of policies for each middlebox is limited. Therefore, the system can achieve the final strategy by finite iteration with probability 1.</p></sec></sec><sec id="s3"><title>3. Results</title><p>In this section, we evaluate the performance of the proposed algorithm for middlebox layout. In the evaluation, we introduce random layout for comparison. Random placement does not consider the impact of middlebox placement on system delay, and only guarantees that the constraint conditions are satisfied. In the design of network topology and service chain strategy, the previous works [<xref ref-type="bibr" rid="scirp.76620-ref2">2</xref>] [<xref ref-type="bibr" rid="scirp.76620-ref7">7</xref>] used well known topology (such as Abilene and FatTree) in strategy execution due to the lack of openly available information. In this paper, we choose the Abilene [<xref ref-type="bibr" rid="scirp.76620-ref8">8</xref>] network as the reference; Abilene is the core network of Internet 2, which is the irregular topology of the network (like most ISP network). The network has 11 nodes, 14 links. We adopted the same approach as the literature [<xref ref-type="bibr" rid="scirp.76620-ref2">2</xref>] and [<xref ref-type="bibr" rid="scirp.76620-ref7">7</xref>] to generate policy rules. Specifically, we assume that there are diffeent number of applications, and the traffic flow required for each application is required through multiple middlebox. We gave each application a random assignment of a middlebox sequence. Then, a number of applications are randomly selected for the traffic flow between the two switches to generate the policy requirements. We distributed the link delay according to the uniform distribution. Based on the link delay, the network controller will select the shortest path passing from one switch to another through route.</p><p>In the evaluation, we generated a total of 400 simulation scenarios. In each scenario, we randomly selected the value of each parameter from the parameter set in <xref ref-type="table" rid="table1">Table 1</xref>, and generated the network settings and policies. The cumulative distribution function (CDF) associated with the optimal value is as shown in <xref ref-type="fig" rid="fig2">Figure 2</xref>. As shown in the graph, the performance gap between the distributed algorithm and the optimal solution is very small. Specifically, the performance gap of the distributed algorithm for 92.5% of the simulated scenarios is less than 20%. In addition, there is a large gap between the distributed algorithm and random layout, which shows that the proposed algorithm greatly improves the performance of the strategy. On average, the distributed algorithm reduces the end-to-end delay of 34% compared to random placement.</p><p>In order to further investigate the effect of different layout schemes on the performance, we studied the distribution of end-to-end delay of each strategy.</p><fig id="fig2"  position="float"><label><xref ref-type="fig" rid="fig2">Figure 2</xref></label><caption><title> CDF of end-to-end delay with different placement over optimal results</title></caption><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/76620x71.png"/></fig><table-wrap id="table1" ><label><xref ref-type="table" rid="table1">Table 1</xref></label><caption><title> Parameters settings in the performance evaluation</title></caption><table><tbody><thead><tr><th align="center" valign="middle" >Parameter</th><th align="center" valign="middle" >Distribution</th><th align="center" valign="middle" >Mean</th><th align="center" valign="middle" >Var</th></tr></thead><tr><td align="center" valign="middle" >Link delay(ms)</td><td align="center" valign="middle" >Uniform</td><td align="center" valign="middle" >1, 1.5, 2, 2.5</td><td align="center" valign="middle" >0.4, 0.5, 0.6, 0.7</td></tr><tr><td align="center" valign="middle" >Available switch ports</td><td align="center" valign="middle" >1, 2, 3</td><td align="center" valign="middle" >N/A</td><td align="center" valign="middle" >N/A</td></tr><tr><td align="center" valign="middle" >The number of middleboxes to deplay</td><td align="center" valign="middle" >7, 8, 9, 10</td><td align="center" valign="middle" >N/A</td><td align="center" valign="middle" >N/A</td></tr><tr><td align="center" valign="middle" >The number of middleboxes in each policy</td><td align="center" valign="middle" >3, 4, 5, 6</td><td align="center" valign="middle" >N/A</td><td align="center" valign="middle" >N/A</td></tr><tr><td align="center" valign="middle" >The number of total applications</td><td align="center" valign="middle" >5, 10, 15</td><td align="center" valign="middle" >N/A</td><td align="center" valign="middle" >N/A</td></tr></tbody></table></table-wrap><p>The results of a scenario are shown in <xref ref-type="fig" rid="fig3">Figure 3</xref>. These results clearly indicate that the layout scheme has a significant impact on the system performance. Middlebox placement by proposed distribution algorithm can obtain near optimal performance, about 70% of end-to-end delay of strategy is less than 100 ms. However, Middlebox deployment according to random arrangement is only 25%. In the schemes generated by distribution algorithm, 100% of the delay of the strategy is less than 150 ms, and there is only 65% in the schemes generated by randomly placement.</p><p>The performance results for each switch with the number of available ports varying are described in <xref ref-type="fig" rid="fig4">Figure 4</xref>. In this simulation, each policy consists of 5 middlebox. As shown in <xref ref-type="fig" rid="fig4">Figure 4</xref>, the performance is improved with the incensement of the number of available ports. This is because those more available ports provide more feasible strategy for each middlebox. We observe that that the distributed algorithm has can utilize the increased resources more efficiently.</p><p><xref ref-type="fig" rid="fig5">Figure 5</xref> provides a comparison of computation complexity between the distributed algorithm and the optimal placement algorithm. It can be clearly ob-</p><fig id="fig3"  position="float"><label><xref ref-type="fig" rid="fig3">Figure 3</xref></label><caption><title> CDF of end-to-end delay of each policy</title></caption><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/76620x72.png"/></fig><fig id="fig4"  position="float"><label><xref ref-type="fig" rid="fig4">Figure 4</xref></label><caption><title> Average end-to-end delay varying the number of available ports on each switch</title></caption><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/76620x73.png"/></fig><p>served that the distributed algorithm reduces the computation complexity significantly from two aspects. One is to reduce the number of overall iterations, the other is to share the computing tasks among all switch.</p></sec><sec id="s4"><title>4. Conclusion</title><p>In this paper, we mainly analyze the optimization of middlebox deployment to minimize the end-to-end delay. The matching graph was utilized to formulate</p><fig id="fig5"  position="float"><label><xref ref-type="fig" rid="fig5">Figure 5</xref></label><caption><title> The number of iteration when varying the number of middleboxes</title></caption><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/76620x74.png"/></fig><p>the problem, which is proved as a potential game and exists the Nash equilibrium. Thus, a distributed algorithm is proposed based on potential game. Through extensive simulations, it is proved that the proposed algorithm can reduce the end-to-end delay effectively and obtain the near-optimal solution.</p></sec><sec id="s5"><title>Acknowledgements</title><p>The authors would like to acknowledge all the members that participation in the exhaustive field measurement campaign for their valuable effort. Thanks also anonymous reviewers for their perspicacious comments.</p></sec><sec id="s6"><title>Cite this paper</title><p>Li, Y.W. and Qu, Z.Y. (2017) Distributed Middlebox Placement Based on Potential Game. Int. J. Communications, Network and System Sciences, 10, 264-273. https://doi.org/10.4236/ijcns.2017.105B026</p></sec></body><back><ref-list><title>References</title><ref id="scirp.76620-ref1"><label>1</label><mixed-citation publication-type="other" xlink:type="simple">Grillo, G., Joseph, D.A., Tavakoli, A. and Stoica, I. (2008) A Policy-Aware Switching Layer for Data Centers. Proc. ACM SIGCOMM, 51-62. 
https://doi.org/10.1145/1402958.1402966</mixed-citation></ref><ref id="scirp.76620-ref2"><label>2</label><mixed-citation publication-type="other" xlink:type="simple">Qazi, Z.A., Tu, C.-C., Chiang, L., Miao, R., Sekar, V. and Yu, M. (2013) Simple-Fy- ing Middlebox Policy Enforcement Using Sdn. Proc. ACM SIGCOMM, 27-38.  
https://doi.org/10.1145/2534169.2486022</mixed-citation></ref><ref id="scirp.76620-ref3"><label>3</label><mixed-citation publication-type="other" xlink:type="simple">Zhang, Y., Beheshti, N., et al. (2013) Steering: A Soft- ware-Defined Networking for Inline Service Chaining. Proc. IEEE ICNP, 1-10. 
https://doi.org/10.1109/icnp.2013.6733615</mixed-citation></ref><ref id="scirp.76620-ref4"><label>4</label><mixed-citation publication-type="other" xlink:type="simple">Liu, J., Li, Y., Zhang, Y., et al. (1939) Improve Service Chaining Performance with Optimized Middlebox Placement. IEEE Transactions on Services Computing, 1-1.</mixed-citation></ref><ref id="scirp.76620-ref5"><label>5</label><mixed-citation publication-type="other" xlink:type="simple">Sdn and Openflow World Congress Intro-ductory White Paper, Network Functions Virtualisation. https://portal.etsi.org/NFV/NFVWhitePaper.pdf,2012.</mixed-citation></ref><ref id="scirp.76620-ref6"><label>6</label><mixed-citation publication-type="other" xlink:type="simple">Hu, X.H., Gao, H.W., Wang, D.Y., Li, Y.M. and Ji, Z.H. (2013) Two Classes of Potential Games and the Solving Method of the Equilibria. Informa-tion Engineering Research Institute, USA. Proceedings of 2013 International Conference on Intelligent Materials and Mechatronics (IMM 2013). Information Engineering Research Institute, 5.</mixed-citation></ref><ref id="scirp.76620-ref7"><label>7</label><mixed-citation publication-type="other" xlink:type="simple">Sekar, V., Egi, N., Ratnasamy, S., Reiter, M.K. and Shi, G. (2012) Design and Implementation of a Consolidated Middlebox Architecture. Proc. USENIX NSDI, 323-336.</mixed-citation></ref><ref id="scirp.76620-ref8"><label>8</label><mixed-citation publication-type="other" xlink:type="simple">Abilene Core Topology.  
https://itservices.stanfo-rd.edu/service/network/internet2/abilene</mixed-citation></ref></ref-list></back></article>