# JSSTR: A Joint Server Selection and Traffic Routing Algorithm for the Software-Defined Data Center
## 5 Joint Server Selection and Traffic Routing Algorithm
### Design Principle
In that case, taking advantage of the switch frog and the shuffling and dividing strategy mentioned above, it is easy to find a new server frog: u5-sw2-sw3-s6, which has obviously a bigger performance value than the original server frog 2. The JSSTR algorithm executes several time loops. At the beginning of the first time loop, the server frogs are firstly initialized using the following strategy. First, the edge switches that connect to the servers that can provide service for the user request are found. Then, the Depth First Search (DFS) algorithm is used to calculate a number of routing paths between the user and these edge switches. Each routing path and the user form a switch frog. After all switch frogs are generated, for each edge switch in the edge switches, its connected servers that can provide service for the user request are calculated. Then, these servers and the corresponding links between these servers and the edge switch are added to the switch frogs to form the server frogs. After all server frogs are initialized, the server frogs in the same group are divided into several memeplexes. Each memeplex executes a certain number of evolutions independently at the end of the first time loop. In the next time loop, the server frogs in the same group are mixed and re-divided into new memeplexes using the shuffling and dividing method mentioned above. Then, these server frogs evolve at the end of this time loop. The time loop will not stop until the number of time loops reaches the maximum number or the difference between the performance values of the current best frog and the last best frog reaches the prespecified value. An example of the proposed JSSTR algorithm is illustrated in Figure 3 and Table 2. In Table 2, \(f1,f2,f3,f4,f5,f6,f7\) and \(f8\) are server frogs. At first, these eight server frogs are initialized as the population, as shown in Table 2. There are two edge switches in Figure 3. Accordingly, two groups (i.e., Group 1 and Group 2) are formed by corresponding server frogs. At the beginning of Time Loop 1, in each group, all server frogs are divided into two memeplexes, such as Memeplex 3 and Memeplex 4 in Group 2. At the end of Time Loop 1, each memeplex evolves independently. For example, \(f6\) evolves from u5-sw2-sw1-sw4-sw3-s6 to u5-sw2-sw5-sw3-s6. Then, in Group 1 and Group 2, the switch frogs are extracted from server frogs. Take Group 2 as an example: at the end of Time Loop 1, the server frogs after evolution are u5-sw2-sw3-s5, u5-sw2-sw5-sw3-s6, u5-sw2-sw1-sw4-sw3-s7 and u5-sw2-sw3-s8, and the corresponding switch frogs extracted from these server frogs are u5-sw2-sw3, u5-sw2-sw5-sw3, u5-sw2-sw1-sw4-sw3 and u5-sw2-sw3. These switch frogs, listed in order of decreasing performance value, are u5-sw2-sw3, u5-sw2-sw3, u5-sw2-sw5-sw3 and u5-sw2-sw1-sw4-sw3. Also listed in order of decreasing performance value, the servers and paths between the server and sw3 are -s5, -s7, -s6 and -s8. Therefore, the new server frogs, which are re-divided into Memeplex 3, are u5-sw2-sw3-s5 and u5-sw2-sw5-sw3-s6, while the server frogs in Memeplex 4 are u5-sw2-sw3-s7 and u5-sw2-sw1-sw4-sw3-s8. Then, the new memeplexes evolve independently. At last, if the convergence criteria are satisfied, the JSSTR stops. The server frogs in the final time loop are shown in Table 2. In that case, the server frog \(f5\) will be chosen as the final solution as it has the best performance value.