scieee AI-readable full text Open interactive document viewer

Development of a system compliant with the Application-Layer Traffic Optimization Protocol

Caldas, Paulo Edgar Mendes

Abstract

With the ever-increasing Internet usage that is following the start of the new decade, the need to optimize this world-scale network of computers becomes a big priority in the technological sphere that has the number of users rising, as are the Quality of Service (QoS) demands by applications in domains such as media streaming or virtual reality. In the face of rising traffic and stricter application demands, a better understand ing of how Internet Service Providers (ISPs) should manage their assets is needed. An important concern regards to how applications utilize the underlying network infras tructure over which they reside. Most of these applications act with little regard for ISP preferences, as exemplified by their lack of care in achieving traffic locality during their operation, which would be a preferable feature for network administrators, and that could also improve application performance. However, even a best-effort attempt by applications to cooperate will hardly succeed if ISP policies aren’t clearly commu nicated to them. Therefore, a system to bridge layer interests has much potential in helping achieve a mutually beneficial scenario. The main focus of this thesis is the Application-Layer Traffic Optimization (ALTO) work ing group, which was formed by the Internet Engineering Task Force (IETF) to explore standardizations for network information retrieval. This group specified a request response protocol where authoritative entities provide resources containing network status information and administrative preferences. Sharing of infrastructural insight is done with the intent of enabling a cooperative environment, between the network overlay and underlay, during application operations, to obtain better infrastructural re sourcefulness and the consequential minimization of the associated operational costs. This work gives an overview of the historical network tussle between applications and service providers, presents the ALTO working group’s project as a solution, im plements an extended system built upon their ideas, and finally verifies the developed system’s efficiency, in a simulation, when compared to classical alternatives.

Full text

Universidade do Minho Escola de Engenharia Departamento de Informática Paulo Edgar Mendes Caldas Development of a System Compliant with the Application-layer Traffic Optimization Protocol July 2021 Universidade do Minho Escola de Engenharia Departamento de Informática Paulo Edgar Mendes Caldas Development of a System Compliant with the Application-layer Traffic Optimization Protocol Masters dissertation Integrated Masters in Informatics Engineering Dissertation supervised by Pedro Nuno Miranda de Sousa July 2021 AUTHOR COPYRIGHTS AND TERMS OF USAGE BY THIRD PARTIES This is an academic work which can be utilized by third parties given the compliance of the rules and good practices regarding author and related copyrights, which are internationally accepted. Therefore, the present work can be utilized according to the terms provided in the license shown below. If the user needs permission to use the work in conditions not foreseen by the indicated license, the user should contact the author, through the RepositóriUM of University of Minho. License provided to the users of this work Attribution-NonCommercial-ShareAlike CC BY-NC-SA https://creativecommons.org/licenses/by-nc-sa/4.0/ [This license allows others to copy, redistribute, remix, transform and build upon this work, for non-commercial purposes, as long as both appropriate credit and license are given, indication is provided if modifications were made, and the new contributions are licensed under the same license as the original.] i ACKNOWLEDGEMENTS I would like to firstly thank my advisor, professor Pedro Nuno Sousa, who was always present in any moment I struggled and required input to improve my work. I would also like to thank my family for financially and emotionally supporting me through my academic journey, as well as the friends I’ve made along the way that made me see the best in people, and last but not least my dog Oscar who showed me unconditional love like only a dog could. I finally also thank you, the reader. Since a work unused is no work at all, may you find some value in this one. iii v 2.5.1Context and motivation . . . . . . . . . . . . . . . . . . . . . . . . 37 2.5.2Architecture............................... 41 2.5.3Viability ................................. 44 2.5.3.1Security............................ 44 2.5.3.2Privacy ............................ 47 2.5.3.3Incentivisation........................ 48 2.5.3.4Networkneutrality ..................... 50 2.5.3.5Multi-Domain orchestration . . . . . . . . . . . . . . . . 52 2.6Summary..................................... 54 3 system architecture and developed mechanisms 55 3.1GeneralArchitecture.............................. 55 3.2Rolesystem ................................... 60 3.3Resources .................................... 62 3.4Roles ....................................... 71 3.4.1ALTOClient............................... 71 3.4.2ALTOServer .............................. 74 3.4.2.1Resourcefiltering ...................... 75 3.4.2.2Serverdiscovery....................... 78 3.4.2.3Inter-server communication . . . . . . . . . . . . . . . . 78 3.4.3NetworkStateProvider ........................ 80 3.4.3.1Network Information Aggregator . . . . . . . . . . . . . 80 3.4.3.2Network State Collector . . . . . . . . . . . . . . . . . . 81 3.4.3.3Network status processing . . . . . . . . . . . . . . . . . 83 4 implementation 85 4.1Technologiesused................................ 85 4.2Serverarchitecture ............................... 88 4.3Network Information Aggregator . . . . . . . . . . . . . . . . . . . . . . . 101 4.4NetworkStateProviders............................ 101 5 experiments 103 5.1TechnologiesUsed ............................... 104 5.2Setup....................................... 106 5.3Scenarios..................................... 109 5.3.1Peer selection in P2Pfiletransfer................... 109 5.3.1.1Overview........................... 110 5.3.1.2Analysisofresults...................... 112 xii 5.3.2HTTP resource request scheduling . . . . . . . . . . . . . . . . . . 116 5.3.2.1Overview........................... 116 5.3.2.2Analysisofresults...................... 117 5.3.3HTTPmirrorselection......................... 120 5.3.3.1Overview........................... 120 5.3.3.2Analysisofresults...................... 122 5.3.4Mediaredirectorproxy ........................ 126 5.3.4.1Overview........................... 126 5.3.4.2Analysisofresults...................... 127 6 conclusion 129 6.1Developedwork................................. 129 6.2Futurework................................... 132 Bibliography...................................... 135 xiii LIST OF FIGURES Figure 2.1Demonstration of Gnutella’s file searching mechanism [16] . . . 11 Figure 2.2Examples of structured P2P query mechanisms that utilize DHTs 12 Figure 2.3Examples of Peer-to-Peer (P2P) query mechanisms with applicationoptimizations........................... 14 Figure 2.4Example demonstration of an overlay network and corresponding physical layer [22] ........................ 15 Figure 2.5Conceptual architecture of a Content Distribution Network (CDN) [31] ................................... 20 Figure 2.6Request routing functionality of a CDN [31] ........... 20 Figure 2.7Client-server architecture [43].................... 25 Figure 2.8Linux Mint prompt to select a software repository mirror . . . . 27 Figure 2.9Approaches to decrease tension between P2P applications and ISPs grouped by their involvement [30] .............. 30 Figure 2.10 ALTO scenario of achieving traffic locality [7]........... 38 Figure 2.11 ALTO architecture (adapted from [71])............... 41 Figure 2.12 ALTO services (adapted from [71]) ................ 42 Figure 3.1Conceptual representation of the ALTO system within a given ISP 56 Figure 3.2System architecture at a macro level . . . . . . . . . . . . . . . . 58 Figure 3.3High-level communication diagram of a successful resource actionrequest .............................. 61 Figure 3.4Example network topology with ISP boundary . . . . . . . . . . 64 Figure 3.5Example overlay network topology without ISP boundary . . . 65 Figure 3.6High-level communication diagram of a P2P application utilizingALTO................................ 72 Figure 3.7High-level communication diagram of a tracker utilizing ALTO 73 Figure 3.8High-level communication diagram of a CDN controller utilizingALTO................................ 74 Figure 3.9Communication diagram of how external network state providers upload information to the network information aggregator . . . 82 Figure 4.1Controller layer class architecture for unversioned resources . . 89 xv Figure 5.1Network topology and integrating Autonomous Systems (ASs) .109 Figure 5.2Scenario 1acquisition time results . . . . . . . . . . . . . . . . . 113 Figure 5.3Inbound traffic by network areas measured in Scenario 1.... 114 Figure 5.4Scenario 2transfer time results . . . . . . . . . . . . . . . . . . . 118 Figure 5.5Inbound traffic flux by network areas measured in scenario 2.119 Figure 5.6Scenario 3transfer time results . . . . . . . . . . . . . . . . . . . 122 Figure 5.7Inbound traffic flux by network areas measured in scenario 3.124 xvi LIST OF TABLES Table 2.1Types of P2P systems (Adapted from [13]) ............ 10 Table 3.1Example network map referencing Figure 3.4........... 64 Table 3.2Example cost map for overlay in Figure 3.5............ 65 Table 3.3Example cost map for the network with limited ISP domain in Figure 3.4................................ 67 Table 3.4Example endpoint property map for server replicas . . . . . . . 69 Table 3.5Example of an ALTO server’s Information Resource Directory (IRD) 70 Table 3.6ALTO server’s available endpoints . . . . . . . . . . . . . . . . . 75 Table 3.7Example ALTO queries with the filtering functionality . . . . . 77 Table 3.8Network Information Aggregator’s available endpoints . . . . . 81 Table 5.1Description of each fragment that can be requested . . . . . . . 111 Table 5.2Peer selection algorithms to be tested in scenario 1....... 112 Table 5.3Measurements to be taken in scenario 1.............. 112 Table 5.4Maximum available bandwidth from client to server considering dynamic link capacity variation . . . . . . . . . . . . . . . . 116 Table 5.5Client algorithms to be tested in scenario 2............ 117 Table 5.6Measurements to be taken in scenario 2.............. 117 Table 5.7Description of the available server mirrors in scenario 3..... 121 Table 5.8Client transfer throughput throttling to be applied if it chooses each given mirror server in scenario 3............... 121 Table 5.9Client algorithms to be tested in scenario 3............ 121 Table 5.10 Measurements to be taken in scenario 3.............. 122 Table 5.11 Scenario 4proxy decisions upon given packet loss values . . . . 127 xvii LIST OF LISTINGS Listing 4.1Parametrized Controller class for unversioned resources . . . . . 90 Listing 4.2Concrete controller extending from a parametrized one . . . . . 90 Listing 4.3Parametrized controller class for versioned resources . . . . . . . 91 Listing 4.4CostmapDTOclass.......................... 92 Listing 4.5Excerpt of the resource authorization service . . . . . . . . . . . 93 Listing 4.6Costmapserviceclass......................... 95 Listing 4.7Example calendar cost map in protocol and database representations........................................ 96 Listing 4.8Similar structure in an endpoint property map and endpoint cost mapstorageentities .............................. 97 Listing 4.9Networkmaprepository ....................... 99 Listing 4.10 Main exception handling class . . . . . . . . . . . . . . . . . . . . 100 Listing 5.1Execution of an example command through the control channel ofagivennode ................................. 105 xix ACRONYMS ACL Access-Control List. ADSL Asymmetric Digital Subscriber Line. ALTO Application-Layer Traffic Optimization. ANE Abstract Network Element. API Application Programming Interface. AS Autonomous System. BGP Border Gateway Protocol. CAN Content Addressable Network. CaTE Content-Aware Traffic Engineering. CDN Content Distribution Network. CDNI Content Distribution Network Interconnection. CORE Common Open Research Emulator. CPU Central Processing Unit. DHT Distributed Hash Table. DiffServ Differentiated services. DNS Domain Name System. DoH DNS over HTTPS. DoS Denial of Service. DPI Deep Packet Inspection. DTO Data Transfer Object. EGP Exterior Gateway Protocol. EMEA Europe, the Middle East and Africa. FCC Federal Communications Commission. FTP File Transfer Protocol. GNP Global Network Positioning. GSLB Global Server Load Balancing. HTTP Hypertext Transfer Protocol. xxi While the tussle between P2P applications and ISPs were the motivation for the creation of the ALTO working group, the benefits of a standardized, maintained, and well provided system for network information querying and guidance on traffic-related decisions could help create the vision of ISPs and applications cooperating for mutual benefit, being thus advantageous for more than P2P applications - in essence, it would be a helpful system for any situation where a decision could be optimized with the addition of proper insight on network infrastructure. With this in mind, this work focuses on tackling the theme of application-infrastructure cooperation on the Internet, with particular focus on presenting, implementing, improving and testing a system that leverages the ALTO protocol as a cooperation enabler. 1.2 objectives The main objective of this thesis is to develop a working system that both adheres to and expands upon the ALTO working group’s devised protocol and architecture. Whilst expanding upon the working group’s devised solution is indeed a goal, it is also important that the developed work complies with the specifications it is based on, so the work done by the IETF in regards to documentation and general reasoning of the protocol remains consistent with this implementation, with further additions being reasoned in this work. With the intent of completing its main goal, this work’s partial objectives were devised as follows: •Literature review in regards to application-level traffic optimization and the cooperation - or lack thereof - between overlay networks and the underlay they operate on. More specifically, an understanding of what the problem entails, the consensus on the existing issues, and an overview of currently proposed solutions. •Complete overview of the ALTO working group’s current work. More specifically, an overview of both their existing RFC documents and currently active internet drafts (at the time of writing). •Definition of both a system architecture which complies with the ALTO solution, as well as the new modules to be added and how they should operate. 4 •Implementation of the devised solution. •Construction of multiple realistic network simulation scenarios and prototype applications to run the test scenarios with. •Testing of the implemented solution within the devised scenarios, and evaluating how it compares against other traditional methods in regards to achieved network infrastructural resourcefulness and client application performance. 1.3 contributions This thesis’s contributions include an extensive overview of the problem of application inefficiencies with network resources and the existing working and implemented solutions. Additionally, the work contributed with a working implementation of the ALTO protocol as specified by the working group of the same name, which includes functionally extensions, as well as the implementation of a devised architecture to fulfill the ALTO working group’s proposed idea of layer cooperation, that includes a network status supply, resource access control, and domain synchronization layers. Additionally, the accomplished experiments in a simulated environment served as empirical proof of the usefulness of an ALTO system for layer cooperation, as it was able to display what is to be gained by using the proposed approach over traditional ones in regards to application performance and optimal network resourcefulness. 1.4 thesis organization This dissertation will be organized in six chapters, as follows: •Introduction: Provides context to the tussle between applications and Internet providers, as well as an argument for the necessity to fix this issue to reach a sustainable environment for both parties. Coupled to this, the dissertation’s main goal is presented. •State of the Art: Displays the existing theory related to popular technologies or overall concepts that could leverage the ALTO protocol for improved functionality and/or performance; secondly, displays existing proposed solutions to traffic 5 optimization at the application level that do so using network information with and without close underlay cooperation; thirdly, overviews the ALTO working group’s proposed protocol and architecture. •System architecture and developed mechanisms: Presents the devised system’s functional and non-functional requirements, as well as an overview of the planned architecture. •Implementation: Provides reasoning for the decisions that were made in the task of implementing the specified project. •Experiments: Overviews the planned simulation scenarios, how they were materialized, how the related tests were performed, and discusses the obtained results. •Conclusion: Presents a critical analysis of the simulation test results, and how they compare to the previously proposed hypothesis. Finally, it presents the results of this thesis in regards to what objectives were completed, the general conclusions that were retrieved, and discusses future work. 6 2STAT E O F T H E A R T This chapter provides a literature overview of the topics that relate to the main problem that this thesis tackles, which is the lack of cooperation between applications and the service providers of the infrastructure where such applications reside. As such, focus is given on discussing networking patterns utilized by applications to give them particular properties which are helpful to achieve their use case. Among these patterns, particular interest will be given to three of them for a couple of reasons: their popularity in the current Internet paradigm, and their potential to optimize traffic that is generated at the application level. Considering this, the patterns that will be discussed are the distributed approach of P2P architectures on Section 2.1, the quite recently popular CDNs on Section 2.2, and the classic client-server model on Section 2.3. For each of these, a conceptual analysis is made - more specifically, contextual background, the architecture itself, advantages and disadvantages of their adoption, and possible use cases. Additionally, there’s an examination of how applications that utilize these patterns affect, positively or negatively, the physical infrastructure where they operate on, and where does potential reside for mutually-beneficial cooperative behaviours between these two layers. Following this, Section 2.4displays existing proposals for increased layer cooperation, and alongside it a discussion on the practical consequences of adopting them. Finally, Section 2.5gives special attention to the ALTO working group’s proposal for a layer-cooperative system, as it is the baseline for this thesis’s work. 2.1 peer-to-peer (p2p) networks 2.1.1 Concepts and Applications Due to the many hybrid implementations that have surfaced, the definition of a P2P network has become harder to pinpoint. Nevertheless, a P2P network is grounded on some properties, among them that it consists of many singular computing elements, the "peers", which have between themselves similar privileges and functions (this con- 7 trasts with the client-server architecture, where two different roles exist - the one that provides a service and the one that can consume it - with functionality and control being thus centralized). P2P networks decentralize computational resources as a means of achieving a given task in a way that is inherently different from a centralized counterpart. This decentralized architecture of the entire system as a whole gives it an interesting list of properties, including: •Dynamic scaling: As all member nodes can share their computing resources with the network, the system increases its capacity with an increase in its users. As a new peer acts as client to the network, scaling the service becomes less of a challenge as each new client will also act as a server. This then removes the necessity to manage how many service resources are needed - the amount of existing resources is linked to the number of existing clients, and thus there’s no need to purchase and manage central resources, as the network dynamically allocates them by design. •Resilience to failure: Whereas centralized solutions are much more vulnerable to node and link failures, a decentralized one can more easily work around such threats - as all peers can encompass the same server functionality, services and resources are not only available on a small fraction of the network, but instead can be redundantly deployed throughout as needed. •Power decentralization: As a consequence to sharing server roles and resources, no single peer has direct control of the network, and the information is not centralized. As such, this considerably deters any attempts to overpower the network, e.g., via means of censorship or biased node favoring. These, however, are not without their nuances - since many P2P hybrids exist, these properties are not immutable. For example, if we consider BitTorrent, which has tracker servers to redirect users to a correct peer with the requested resource, whilst the network itself can still be resilient to failure, the content-retrieval service that the P2P network provides has a single point of failure and of control - the trackers themselves. Furthermore, the P2P network design brings, by its nature, alongside their potentially advantageous properties, also some some potentially disadvantageous ones to consider: •Security hazards: The equal functionality property that P2P networks have gives peers much power to influence others. Without proper care, malicious actors are a security risk. 8 •Management: Since resources and services are not centralized, tasks such as event logging and resource backups become very difficult, and perhaps impossible if the peers do not abide by any proper orchestration strategies. P2P applications have had, in the past decades, a mainstream image that is plagued with legality and security issues. Nonetheless, its design possesses many interesting properties - some of them displayed above - that make it fitting for varied use cases, e.g., file sharing, media streaming, social networking, and computation with distributed and cooperative algorithms. Despite their reputation, the influence of P2P applications is undeniable: Sandvine [8] published a global Internet phenomena report concluding that BitTorrent alone had, in 2019, a global application total traffic share of 2.4%, but, perhaps most importantly, over 27% of total upstream volume of traffic, with that value being 44% for the Europe, the Middle East and Africa (EMEA) region alone [6]. Beyond file sharing purposes, P2P applications have been recently considered a fitting solution for low-cost content delivery systems in scenarios of high demand - for example, in applications such as PPStream [9] in China, which provide television content over IP to large audiences. Similarly, Akamai [10] recognizes the potential of P2P technologies to provide a highly distributed option for serving static content over the network, although it being currently lacking in management and control features [11]. Indeed, P2P Internet video broadcast services - and other content delivery services that utilize P2P for that matter - seem attractive as they are cost-effective and easy to deploy, and are fitting for large scale demands, and thus have the potential to become a more mainstream solution [12]. Concluding, the P2P network architecture has many appropriate use cases, and their rather different strategy, compared to the client-server architecture, gives it many potentially interesting properties for users and ISPs. Considering its large global traffic share, particularly in upstream traffic, and its potential adoption towards the large scale demands of the future, P2P applications are likely to persist and will be in the minds of ISP administrators for the near future. 2.1.2 Architecture As stated previously, the term "peer-to-peer" has become very broad and now serves as an umbrella for many different variations of the core decentralized architecture design. Thus, this section focuses not on giving an overview of a single conceptual 9 architecture that defines a P2P network, but instead of the many existing variations and how they differ among themselves. All P2P networks are characterized by consisting of peers that know one another as to form a so-called overlay network on top of its supporting underlay network. How peers organize themselves in this structure and how they operate is what distinguishes the many sub-types. Table 2.1groups known P2P systems in regards to their centralization and structure, similar to the groupings of [13] and [14], with the latter further distinguishing the protocols in regards to other parameters, e.g., security, reliability, and performance. The rest of this section follows the survey made by the former. Centralization Hybrid Partial None Structure None BitTorrent, Napster, Publius Kazaa, Morpheus, Gnutella (extension proposals), Edutella Gnutella, FreeHaven In Infrastructure Chord, CAN, Tapestry, Pastry In System BitTorrent (DHT/Trackerless), OceanStore, Mnemosyne, Scan, PAST, Kademlia, Tarzan Table 2.1: Types of P2P systems (Adapted from [13]) One would expect that all P2P applications would have no centralization at all, since the P2P design ponders functionality spread throughout the network. However, some modifications have been made in some of these sub-types, which shift how much decentralization they really have in practice. Similarly, different strategies exist that dictate the structural hierarchy that resides within the member peers. As would be expected, these sub-types of P2P networks thus possess different strengths and weaknesses, and these can be leveraged to the most appropriate use cases. Early versions of Gnutella [15] come as a famous example of a decentralized and unstructured architecture, as peers act with equal functions and privileges, and no inherent structure exists for peers to connect to each other, nor does it for storing or retrieving content from the overlay network. The bootstrapping phase consists of users reading from a list containing a set of Gnutella peers - a list that is retrieved from a trustworthy source - and attempting to connect to each one of them until a 10 preferred number of known neighbours is reached. The unstructured nature of this protocol makes it so there’s no systematic way to efficiently retrieve content, and thus a technique of flooding the network with content queries is used until either a reply is met or the predefined TTL value is exceeded, as is exemplified in Figure 2.1. Figure 2.1: Demonstration of Gnutella’s file searching mechanism [16] Partially centralized architectures were defined as similar to those which are decentralized, but with the added caveat that some peers are chosen to specially service a portion of the network. This is done to take advantage from the fact that not all network peers are alike in terms of memory, computational power, or other relevant resources. As such, more capable peers are elected as "super nodes" and are delegated with more responsibilities, noting that the network self-configures in situations where such elected nodes either fail or willingly leave the network, and as such there is no single point of failure as there would be on a true centralized architecture. A hybrid architecture approach in a P2P network employs some elements from the client-server architecture. With Napster [17] as an example, whilst peers still operate as both servers and clients, they must contact an intermediary and central server when 11 querying for content, which will in turn redirect them to one or many peers that contain it - a similar concept applies for BitTorrent, where such intermediary servers are called trackers. Obviously, the choice to add a centralized aspect to the architecture hinders many of the advantages from a purely unstructured solution - namely its scalability, resilience to failure, and decentralization of control - serving as a trade-off to facilitate the control and maintenance of the network, as well as the peers’ ability to bootstrap to it and locate content. A P2P architecture is structured if it employs some non-random and systematic criteria on how the network operates, e.g., how peers organize themselves and where content is stored and retrieved. For example, FreeNet [18] uses the content’s hash as a key that is used to query for it, and which in turn is used by the peers in each subsequent hop to know where to forward the request, instead of flooding the network in attempts to blindly find it like Gnutella does. Many of the structured P2P architectures rely on Distributed Hash Tables (DHTs), which act as a decentralized map structure that binds a given key to some content in the network, in such a way that the full key-space is partitioned over the peers. Two examples of structured P2P architectures that use DHTs can be seen in Figure 2.2. (a) Chord file query mechanism [19](b) CAN file query mechanism [13] Figure 2.2: Examples of structured P2P query mechanisms that utilize DHTs Specifically, Figure 2.2a displays how the Chord algorithm uses a circular DHT where each peer knows the location of some peers that are their predecessors, and some that are their successors. When a peer needs to query for some content, it uses its key to firstly search for it locally and, if it doesn’t exist, it forwards the query to their successors, and the process recursively continues. On the other hand, Figure 2.2b display how Content Addressable Network (CAN) has the key-space mapped to a virtual two dimensional grid, and its area is partitioned to peers considering a deterministic 12 function, which in turn is used by querying peers to figure out where a given content is stored. A straight arrow from querying node to providing node represents the routing path that the querying message must travel: A-B-E. Employing a systematic way to self-organize and share content is the means to guarantee that a P2P network can be fully decentralized whilst maintaining a desirable level of performance. However, the reliance on structure results in more maintenance operations, e.g., managing neighbour pointers on Chord or managing area allocations on CAN, and that can be costly or even impossible with high rates of peer churn, i.e., with a sufficiently large rate of peers entering and leaving the network. 2.1.3 Effects to the network infrastructure Historically, ISPs have deemed P2P traffic as unideal or even undesirable. Besides the aforementioned troubled legal past that is tied to P2P applications, the overall properties of P2P networks make them unappealing to support - due to the distributed nature of these types of networks, the overall traffic is less predictable, with the higher upload traffic volume in edge networks requiring infrastructural investments, and the network-agnostic operation mode of P2P applications leads to inefficient network resource usage. P2P networks who neither have structure nor a central point of control have to utilize content retrieval methods which are bound to be less efficient than their counterparts. However, architectures which fit in these categories mostly do so with a clear purpose - Gnutella’s decentralized nature makes it very hard for individual nodes or external entities to regulate what can happen in the network (such as enforce legal actions), and its lack of structure simplifies the implementation and reduces the overall effort to bootstrap to the overlay, making it a good fit for applications with a high peer churn rate. Similarly, FreeHaven, an also unstructured and decentralized P2P protocol, has its architectural decisions fit a very specific use case, as it "emphasizes distributed, reliable, and anonymous storage over efficient retrieval" [20]. The lack of systematic means to efficiently locate content by these P2P architectures means that more ad-hoc methods have to be used, which are less efficient and thus incur in bigger workloads for ISPs - the usage of query flooding by Gnutella and message broadcasting by Free- Haven are examples of this. The usage of structure by P2P networks can, as stated before, result in more efficient content and peer location algorithms. However, maintaining such structure also 13 Figure 2.5: Conceptual architecture of a CDN [31] The true power of these kinds of networks comes from their strategically deployed cluster of replicated servers - at a global scale, this implies having them geographically dispersed and located inside or nearby networks with large content demands. The origin server possesses the content that is to be served, and the bootstrapping process has the content uploaded into the network, which is afterwards replicated to these edge servers. Figure 2.6displays how, conceptually, the request routing functionality of a CDN works. Figure 2.6: Request routing functionality of a CDN [31] 20 As can be seen, the request is firstly directed to the origin server, which serves only light and basic content. In the situation where large static content is requested, the origin server redirects the request to the CDN provider, which utilizes a selection algorithm to elect the most appropriate edge server to serve the content to the end user. The request routing mechanism is the one that redirects a given user to a given edge server. The prevalent approaches are, according to [36], the following: •Domain Name System (DNS) request routing: The user must first resolve a domain name to retrieve a piece of content. The CDN’s DNS server processes the request and, utilizing the user’s Internet Protocol (IP) address, historical delay measurement information and current server loads, responds with the address of the edge server that seems most fitting to provide such content. •Hypertext Transfer Protocol (HTTP) request routing: Content is firstly requested to a nearby proxy server, which in turn answers with an HTTP redirect to be resolved by the client in order to find the content. The HTTP requests can occur in subsequent rounds and can also use DNS knowledge when the redirection domain must be resolved. •Anycast request routing: The CDN provider announces an anycast prefix to the network. Whenever a router receives multiple announcements to the same prefix incoming from different locations, it chooses one considering some custom criteria, usually being AS hop count and Interior Gateway Protocol (IGP) weight. Thus, different routers can have a given anycast address mapped to different hosts, meaning the ones that are most suitable for that particular router. These mechanisms are also discussed in [31], but also add: •Global Server Load Balancing (GSLB):Service nodes, consisting of edge servers and GSLB-enabled web switches, are interconnected in a network. Individual nodes possess global awareness of the network, meaning the status of each individual server. With edge servers having more information on the health and status of all other candidate edge servers, and the web switches acting as authoritative DNS servers, the network can enable the support of a globally-wide server load balancing mechanism that intakes dynamic server information. •Uniform Resource Locator (URL) rewriting: The origin server redirects the end user via dynamically altering the host page’s URL links. 21 •CDN peering: An extension of a single CDN network to multiple, interconnected CDNs which serve content on behalf of others when appropriate. This is helpful to extend the domain reachability of a single CDN, increase fault tolerance, and ability to achieve better performance with more candidate servers to choose and balance loads from. It is vital that a CDN possesses a clear view of the network performance inside its domain. [31] lists important metrics which are used to measure CDN performance: •Geographical proximity of end users •Path latency •Path packet loss •Path bandwidth •Path startup time •Path frame rate •Server load Means through which these metrics are retrieved by the network include traffic monitoring of end user to surrogate server communications, and retrieval of surrogate server feedback via application requests or measurement probings [31] [11]. Having a clear understanding of CDN performance is important for system management in two fronts - firstly, through performance evaluation, by providing the billing and monitoring modules the verification of how the network is faring at its task of caching and delivering content on behalf of clients; secondly, through performance optimization, by providing the logical layer an updated view on network status, serving as contextual input that the system uses to better reason on how to act - for example, in regards to the caching and request routing mechanisms. 2.2.3 Effects to the Network Infrastructure As previously discussed, CDNs came as a tool to strategically position content on the network in such a way that it can more quickly and more reliably be retrieved by an end user. These CDN systems are then inherently a method of optimizing network 22 resource utilization in the application layer, and thus are of great interest for ISPs and, if done properly, can be very appealing not only to them but also to end users that use applications leveraging these networks. The usage of a single content-providing server - or a limited set of them - which is far away from globally dispersed content demand, is prone to server overloading and path congestion problems if a big enough scale is achieved. Data caches are a classic solution to network inefficiency problems, and are used by CDNs as a means to replicate content to strategic locations to better serve users, with the added benefit for ISPs that their network resources are efficiently used, with the ability of reducing the total amount of used bandwidth needed for a service to operate - as data travels a shortened total amount of network hops from data source to points of data demand - and reducing congestion of inter-domain links - as data caches will reside locally and redistribute traffic away from highly contested network links. It can thus be stated that the relationship between CDNs and ISPs allows for a win-win scenario because efficient network usage has consequentially better service quality, benefiting service providers and applications, respectively. However, CDNs seem to lack cohesion with the underlying network infrastructure during normal application operations. As stated by Akamai, a leader in CDN services, in their report [11], the large scale and complexity of the Internet, where it takes well over 650 networks to reach 90% of all access traffic, adds to it many challenges to the CDN’s role of content delivery. In particular, whilst good investment seems to exist at the first and last mile of Internet access (server and end user placements, respectively), there seems to be little economic incentive to invest in the middle mile, composed of peering points shared among networks. These peering points then become network bottlenecks that are susceptible to increased traffic packet loss and latency, making inter-network communications unreliable, and loose coordination between autonomous networks with internal biases is pointed as a main cause. Due to this, even a well provisioned data center will be at the mercy of the various inter-network bottlenecks that may arrive, and performance is susceptible to degradation. In fact, the paper suggests a clean-slate redesign of the Internet as a potential solution to its many problems - besides the peering point congestion mentioned above, inefficient routing protocols, unreliable networks, inefficient communications protocols, and application limitations also add to the problematic - but such a redesign to a massive and highly critical global infrastructure doesn’t seem feasible. In alternative to proper network infrastructural insight, CDNs have to rely on network probing, traffic monitoring, and server feedback, as discussed on Section 2.2.2. 23 Even assuming that these are sufficient, the usage of probing techniques will incur in overhead traffic on the network, with this overhead being exacerbated if many other overlay networks or applications also apply this technique. Similarly, traffic monitoring to extract end-to-end path metrics to end users requires resources and takes time, and may also incur in redundant operations being applied on the network. Advantageous as network probing and traffic monitoring mechanisms can be for CDNs to properly conduct request routing and caching decisions, a case must be made for proper application-infrastructure synergy during decision making in the overlay. Much like P2P systems, to infer on network status by measurements alone is insufficient when compared to receiving input from trustworthy and authoritative entities that possess privileged network information, such as ISP administrators. Attributing node pairings entirely on geographical data was previously discussed as being a non-optimal way of assessing node selection at the application layer in Section 2.1.3, and the same would apply in the case of CDNs, where edge servers are paired with end users. Again, much like in the scenario of peer selection in P2P systems, the usage of network measurements made by the CDN itself to better pick the appropriate end-server, while potentially beneficial, can certainly be improved upon if it used additional, hard to retrieve data that only ISPs or other privileged infrastructural entities could possess, and which are at position to guide applications in the infrastructure they deeply possess knowledge of. There indeed seems to be a consequential coupling between overlay decisions in the CDN systems and the underlying infrastructure. If the CDNs were not to take ISP input when redirecting clients, suboptimal choices would be made that would be prone to bottleneck congestion, and if, on the other hand, ISPs were to employ only their own biases in content request redirection, user-level application Quality of Service (QoS) agreements might not be met. [37] states that this lack of awareness to network status is indeed problematic for CDN systems, listing end user mismatching to edge servers based on dubious DNS-based location binning and resource consuming, non exact methods to detect bottlenecks, as well as lack of agility in server deployment in ideal locations. This is a view shared by [38], which adds that these problems reside in a shared medium that raises the opportunity for cooperative behavior that would enable better application performance and optimized ISP resource utilization. In fact, Akamai themselves have formed content delivery strategic alliances with major ISPs, with AT&T [39], Orange [40], Swisscom [41] and KT [42] among them [37], which hints at this type of partnership being the norm for content distribution technologies of the future. 24 ISP input permits applications to act in a more network-aware fashion than without it - whereas pairing overlay nodes or deploying edge servers in terms of geographic distance, RTT, or any other metric, may give further decision power than a purely network-agnostic overlay system, proper guidance by ISPs could help pairing based on more complex metrics that, besides the aforementioned ones, also consider ISP objectives, e.g., to minimize network distance, avoid bottlenecks, locate content caches, etc. A more efficient Internet can be obtained if many other overlays coordinate their efforts with the ISP, which in turn can now orchestrate its traffic in a way that would previously be generated with no prior guidance, and that can now be engineered to maximize network resource utilization and, consequently, application performance. 2.3 client-server model 2.3.1 Concepts and applications The Client-Server model is a classical way of attributing roles in the network. Whereas the P2P architecture blends server and client roles into each node, this architecture delineates these distinctly, and their purpose on the network, as Figure 2.7shows. With it, the service layer is centralized onto the server nodes, and the only role expected of client nodes is to request services from them. Figure 2.7: Client-server architecture [43] Operating with philosophies which are opposite to the P2P architecture, it is to be expected that the advantages and disadvantages should too be contrasting - by centralizing the services, maintenance and general administration of serving nodes are much facilitated, and limiting the number of servers to a select and trustworthy few, instead of scattering that functionality to all nodes in the network, greatly minimizes security risks. On the other hand, the drawbacks are also apparent and mirror a distributed solution - issues of scalability, resilience to failure, and resilience to monopolization of 25 power arise from the decision to engineer an application that creates clear boundaries between client and server. This classic architecture has seen a lot of adoption by applications, with use cases that include serving content via HTTP or File Transfer Protocol (FTP), or enabling email communications [43], to name a few. Adding to this, the client-server approach also serves as a direct alternative to the P2P one in many fields, e.g., file transfer or media streaming, with their respective advantages and disadvantages needing to be weighted out for a proper choice to be made. As an attempt by service providers to still operate a client-server model whilst reducing its associated downsides, given techniques were created and employed. These techniques will be explained from the perspective of the client-server architecture, but can easily be adapted to other structural paradigms as they stand on their own conceptually. One of which, by the name of CDN, is of particular importance in this work and as such has its specific overview in Section 2.2. Some other methods will be discussed below. Server mirroring, one famous technique, is the act of continuously synchronizing a server into its replica, or mirror, essentially creating an exact copy of it that is now accessible as if it were the original. Whilst CDNs aim for replicating chunks of contents wherever it may be necessary, the act of server mirroring performs an integral copy of a server which is self sufficient at servicing a given client, as long as it periodically checks up with the primary server for synchronization. It is a standard business strategy that uses redundancy as a means to increase reliability, availability and performance. The existence of many servers that perform the same task means that these can be strategically chosen to serve a client in a given situation, e.g., by selecting the one that has reduced load and smaller end-to-end message delay to the user. Figure 2.8 shows an application of this, where multiple server mirrors exist to deliver software packages to the Linux Mint [44] distribution. The user has the choice to manually select one of these mirrors, and ideally chooses the one that is most fitting to them. 26 Figure 2.8: Linux Mint prompt to select a software repository mirror Server load balancing is another popular technique to solve scalability issues, and it refers to the act of distributing tasks over a set of computing nodes as a means to make the service more efficient, since a server with little processing load is bound to respond quicker than one with more, and situations of overloading become less common as it is now spread out over multiple processing units. Load balancing algorithms can be categorized, according to [45], into two categories: •Static: Does not take current system status into account, instead acting upon static rules that define the load type, in regards to, for example, processing power and memory requirements. A round-robin or random selection of load attribution are part of a static approach. •Dynamic: Load is distributed at runtime, considering dynamic information about the system that is continuously being collected. A static approach can be compelling due to its simple nature that makes it easy to implement and much faster in comparison to run. On the other hand, a dynamic approach is more complex by definition as it requires the additional infrastructure required to collect and compute upon the system statistics. As it might be expected though, a load balancing scheme that attempts to optimize resource utilization considering real-time information about system status and performance is bound to have bigger potential at effectively selecting which server should handle a given request, since more factors are known to better aid the decision, including the current server 27 loads in the server cluster, their available storage and processing resources, network conditions, etc. Several methods exist through which to implement load balancing. For example, DNS-based approaches perform the load balancing at the domain name resolving stage, where the IP address response is given after selecting an optimal server, such as the proposal in [46]. Software Defined Networking (SDN) solutions, as another example, leverage a control pane that is responsible for intercepting server access calls and activate the load balancing mechanisms that redirect that call to the selected server, as happens in the proposal in [47]. 2.3.2 Effects to network infrastructure As a base method, the utilization of the client-server architecture is not at all recent to ISPs. Quite the contrary, it was the norm throughout the decades to provide a service by using a set of single-purpose server machines. Intuitively, using a limited number of servers to respond to client needs will have problems scaling, as increased demand is prone to service overload and path congestion, hence the need to employ some of the strategies discussed on the previous section. These strategies come from the necessity to fulfill both application and ISP requirements, i.e., to achieve proper QoS levels and infrastructure resourcefulness that helps the general good function of the network, respectively. Much like the content replication utilized in CDNs, an integral replication of a main server proves itself as an advantageous tool capable of delivering services more closely to users, and as such allows the reduction of the total amount of bandwidth used to serve all clients. Optimizing application traffic is crucial to guarantee good network resource usage, and in case of server mirroring it comes down to good strategic deployment and dynamic, intelligent algorithms to properly attribute mirrors to requesting end users. Giving end users the choice to manually select the serving mirror, as commonly happens when downloading software, for example, seems problematic, as applicationgenerated traffic is not optimized. In fact, when considering the Linux Mint software package distribution discussed in the previous section, despite there currently existing seventy mirrors deployed throughout the globe to fit this role, a large number of these remains mostly unused whilst the main and default server is constantly prone to overworking [48]. 28 It can be stated that end users both don’t care enough to optimize traffic nor do they have enough information to properly do so even if they did. Deployment of server mirrors is a great tool that brings with it the issue of optimizing server selection, and much like all examples given so far, traffic generated by applications can be firstly optimized by the applications themselves if they consider static and dynamic information of the network they operate on. Load balancing is too a point of great interest in the task of application-layer traffic optimization. The task of attributing a current request to a pool of available redundancy workers is a common strategy to help scalability, and the means through which to do so have concrete network consequences, since it has the power to shape great amounts of traffic in ways that can be more or less preferable for ISPs. It could then be deduced that a load balancing strategy has better chances of being efficient if it fully aware of both server status and network conditions. Doing so with ISP cooperation would reveal insight into some network status information and administrative preferences. For the section of data that could be retrieved utilizing probing and measurement strategies, a bank of centralized data possessed by an entity with full network knowledge would greatly reduce overhead probing traffic and monitoring computation cycles. For the section of data that could only be retrieved with proper ISP insight, more efficient and network-cognizant decisions would now be possible, in contrast to the limited one-sided attempt at optimizing application decisions that generate traffic. 2.4 traffic optimization by applications and layer-cooperative approaches This section serves to display proposed solutions and existing implementations that have been made in the attempt to optimize application traffic utilizing network information. Given the increasing scale of the Internet as a near ubiquitous system, and the increasing tension between applications and service providers, it comes as no surprise that the area of layer cooperation has been through exhaustive work. Many solutions have been devised for specific use cases, with varying degrees of power given to each one of the layers, and different levels of cooperation. Along with their description, a review will subsequently be made in regards to what the proposals state their impact 29 and spanning several weeks. The work concluded that statistical methods used to select between multiple equal web servers had high correlation with download time from the selected server, but optimizations should be evaluated in regards to computer workload and the amount of probing traffic. Tackling a similar challenge, [64] proposes a method of server mirror selection which is better optimized than the more popular approach of giving the user the selecting choice. The proposed solution’s architecture consists of two types of agents: a client agent, which monitors the mirror server it was deployed in and stores static information, e.g., geographical location of server and maximum capacity, and dynamic information, e.g., current service load and bandwidth in use. This information is then sent to the other role of the architecture, the server agent, which compiles it and acts as an oracle that is queried by users whenever mirror selection is needed, replying with a ranking of candidate servers based on bayesian networks. Congruent to the task of optimizing network traffic with layer cooperation, [65] proposes a reconfigurable and adaptable overlay multicast system, further optimizing the multicast strategy - used for group communication as a means to reduce redundant traffic - and leveraging collaborative efforts between it and the ISPs to construct multicast distribution trees whilst integrating traffic engineering mechanisms for the task of network usage optimization. 2.4.4 Summary Concluding, application traffic optimization does indeed seem to be a common concern for P2P, CDN, and Server-Client systems, as it improves application performance. Indeed, potential to optimize traffic at the application layer exists if attempts are made to better comprehend current network status to aid application decisions, and so is made by realizing more about the underlay, whether by probing it, or retrieving that information from - or delegating decisions to - authoritative and generally trustworthy sources that keep both interests in mind. A fully mutual cooperative scenario seems much more efficient than one sided approaches. Considering ISPs, the ability to directly impact application behavior lets them engineer traffic at a more fine-grained level, that would be impossible without it. Considering applications, one of the following could happen: one possibility is that the application can start using network data to optimize its decisions, another possibility is that an application already leveraging only probing data can swap it’s 36 own deduced knowledge with the ISP’s, minimizing the amount of redundant network overhead generated from all kinds of applications monitoring the underlay for their status, and another possibility is that, besides using the oracle’s probing data, the application further improves its decisions with the better insight that only the ISP itself could provide, with its privileged and intimate knowledge of the infrastructure and how to more efficiently run it, and in possession of a centralized monitoring structure that gives information about historical traffic patterns over long stretches of time, factors including operational costs, data locality, cache detection, or network-wide bottleneck alleviation can then be targeted. Summarizing, a win-win scenario between layers is theoretically possible, and an argument was made stating that, assuming an existing cooperative infrastructure and voluntary participation from both parties, there are ample benefits to be gained. 2.5 application-layer traffic optimization (alto) working group 2.5.1 Context and motivation Acting on research indications informing that improved peer selection algorithms based on ISP-provided information could help reduce infrastructural costs and increase P2P application performance, the IETF devised working groups to explore possible standardization in the area of layer-cooperation [7]. Among those groups is the ALTO working group, whose domain is traffic localization. The ALTO [66] working group designed an HTTP-based protocol whose function is to allow hosts to query authoritative entities on network information. The IETF- devised working group’s project has gathered much academic interest, e.g., [7], [61], [65], [23], and [30], as well as being suggested as an appropriate framework to help fix various problems, e.g., [62], [61], [36], and [58], and these form a subset of a larger preoccupation with the underlay-overlay tussle and the attempt to find layer collaboration mechanisms. The envisioned scenario of the service provided by the ALTO architecture, as can be seen in Figure 2.10, considers both the physical and application domains - the underlay and overlay, respectively. 37 Figure 2.10: ALTO scenario of achieving traffic locality [7] The ALTO service is provided by some oracle, which in turn needs to be supplied with network information that can take many forms - topological structure, routing costs, static policies, etc. - and, most importantly, such data is to be fed by an ISP or such other authoritative entity that contains truthful and relevant network information that the oracle could deem useful in aiding its clients. Using Figure 2.10 as an example, consider that "Peer 2" wishes to retrieve a given resource, and after probing the overlay network - by querying a tracker, using a flood of peer pings, or some of the means utilized by structured P2P networks - the peer locates "Peer 1" and "Peer 3" as possible candidates to serve the content it wants to retrieve. Aware of the fact that choosing whom to consume a service from has impacts on both application performance and network resource utilization, "Peer 2" uses the ALTO service, querying the oracle on information pertaining to the candidate peers, and in regards to metrics that better fit the needs of the application - because different applications could have different QoS metric priorities in mind, like a media stream with low delay needs or a file sharing application with focus on high bandwidth availability. The ISP is then in full control of engineering how the traffic from this resource transfer will flow, and can steer "Peer 2" into favoring "Peer 3" - since they reside in the same physical network domain, this would improve infrastructure resourcefulness since there would be no need to make use of peering links that interface with external regions. As could be deduced from this and similar scenarios, an architecture containing one or more servers that are knowledgeable of the network they reside on could 38 be an important tool to make P2P applications locality-aware, a common goal for the underlay and overlay parties since it is a win-win scenario. Despite its origins lying in the efforts to localize traffic in P2P applications, the ALTO protocol and its encompassing system is now being considered in other fields, to be now further discussed. A first area of interest is CDNs, most specifically the on-going works in extending the base protocol to implement the CDNI Request Routing Footprint & Capabilities Advertisement interface [67], which is a subset of the CDNI standard [58] that aims to allow upstream CDNs to query known downstream CDNs for their willingness to accept content requests on their behalf. In particular, one of the main functionalities of the CDNI request routing interface is the ability for upstream CDNs to retrieve static or dynamic information of download CDNs (available resources, usage loads, etc.), which they provide themselves, and that allow the upstream CDNs to better choose the appropriate edge server that could serve a given end user. ALTO serves as a good protocol to implement such functionality because it fits its use-case: some node wishes to improve its routing decisions to better decide on which other node to select by using information that, in its entirety, is hard, or nearly impossible, to independently retrieve, specially without generating much overhead querying traffic. Regarding CDNs, the querying node is an upstream CDN server that wishes to resolve their content requests by attributing the client to the most optimal downstream CDN servers, where the content resides. At a more abstract level, this is similar to the use case already discussed, which is shown on Figure 2.10, where overlay peers required assistance to more optimally select peer connections. Edge computing, similarly to CDNs, uses a paradigm of flexible service distribution that enables deployment closer to the end user for better performance, and thus is inherently affected by network status. Current work is being made on how ALTO can be leveraged to aid the deployment of functions or applications in the network edge [68]. Much like the previous example, ALTO is being used to guide an application in a decision that impacts both layers. By querying the ALTO server, the client can retrieve information that regards to Points of Presence (PoP) where functions/applications can be deployed, such as a cloud computing provider’s available resources, e.g., Central Processing Unit (CPU),Random-Access Memory (RAM), or storage, but also network information that pertains to the outside of the PoP, mainly network connectivity metrics, e.g., end-to-end bandwidth and delay, and routing costs. The utilization of the ALTO protocol in this context would allow edge service clients and providers, as well as ISPs, the ability to combine efforts as a means to optimize edge computing deployment that 39 considers the current network status, and doing so would thus result in benefits for both end users and infrastructure maintainers. More broadly, current work is also being done in specifying Abstract Network Element (ANE) path arrays between points [69] and time-specific cost values [70], both of which share higher insight into the network, at the discretion of the ISP, as a means to provide even more context to applications about the infrastructure, such as identifying potential path bottlenecks and times of traffic peaks, and thus improve the application’s ability to optimally generate traffic. A mode of operation where applications no longer act in disregard of the network infrastructure they run on, but instead in deep consideration of it, could help significantly alleviate the issues emerging from the tension between the underlay and overlay, and is of mutual interest - improving application performance and reducing infrastructural costs. Enabling a communication channel can thus allow for many different cooperative use cases besides the aforementioned ones. For example, redirecting users to nearby data caches or warning them of server maintenance ahead of time. The existence of an all-encompassing oracle could also prove beneficial for applications which utilize periodic network probing to guide their choices, as such information could be measured by a select few nodes in the network and applicable to all nodes which are close-by in ways that the ISP deems advantageous, such as belonging to the same AS or geographically near, thus minimizing the amount of otherwise redundant probing required by all application entities that wanted some network status information. The oracle, besides containing measurements that could only be retrieved by the ISP itself due to its privileged access to the network, such as IGP packet inspections or secure Simple Network Management Protocol (SNMP) queries, by handing over the decision-making process to the service provider entity, gives power to better steer traffic in a way that favors internal policies and strategies, regarding, for example, peering agreements, current traffic flow of other applications, known bottlenecks, etc., that could not be deduced by the applications alone. Thus, in the decision of how to generate application traffic, the responsibility should reside in both the application and the infrastructure as a way to benefit all relevant parties, i.e., the end users, the application stakeholders, and the service providers. The ALTO protocol serves as an enabler of a mutually cooperative layer interaction system that, by becoming the standard, would aid towards a sustainable life-cycle of the Internet. Finally, standardizing an architecture and related protocols for a clear problem domain could help a large subset of similar issues, since a well defined and tested speci- 40 fication would exist, thus allowing many applications to leverage the ALTO protocol’s functionalities to their needs, not requiring further cycles of development for a specification when one already exists. Also, the attempt to standardize the oracle pattern is helpful as it joins forces from many different domains which share common problems - many of which were exemplified previously - into a single specification. A widely accepted and used solution can evolve from a combined effort, and would target issues such as security and scalability, creating a single point of convergence that is mature enough to be adopted with confidence, accelerating the transformation of the Internet as individual players would not need to develop their own specifications. 2.5.2 Architecture The high-level conceptual ALTO architecture can be seen in Figure 2.11. Figure 2.11: ALTO architecture (adapted from [71]) Central to the operation is the ALTO server, which stores network information and provides it to querying clients. Such network information is provided by trustworthy and relevant entities, and could be derived by routing protocols, ISP-specific policies, historic measurements, and feedback provided by third parties regarding application performance on the network. Two protocols can be seen as part of the general architecture: firstly, the provisioning protocol, which is not at time of writing contemplated by 41 the ALTO working group, should specify how information is provided to the ALTO server, and secondly, the ALTO protocol, which is the main focus of the working group with the same name, specifies server-client interactions as a request-response interface for retrieval of network attributes. The ALTO client is the main consumer of the ALTO service, and it queries the ALTO server on network information whenever it deems such data as necessary to what it’s doing at a given moment, with some potential use cases discussed previously. An ALTO client could be seen as any entity which is able to interface with the ALTO protocol with the role of a client, and as such is not tied to a specific implementation - in the example of P2P file sharing, a peer can act as an ALTO client (like the example scenario in Figure 2.10), but a tracker could instead take that role, enhancing its ability in assisting peer communications by having an embedded ALTO client that would then act on behalf of peers when querying for ISP insight with the goal of providing an optimal peer pairing. Using the tracker-oriented ALTO client approach would minimize needed P2P client protocol modifications and thus facilitate integration with currently existing applications. The ALTO services contemplated by the working group can by visualized in Figure 2.12. Figure 2.12: ALTO services (adapted from [71]) The ALTO server stores and provides special mappings in the form of network and cost maps. A network map provides network location grouping identifiers and the corresponding aggregated endpoints. It utilizes Provider-Defined Identifiers (PIDs) as keys, and the mapping itself is left to the responsibility of the providers. A provider is free to group endpoints with the criteria it pleases. For example, he could group nodes by geographical location, by common subnets or ASs, etc., and in that way attribute properties to the aggregate, instead of the endpoint. This is advantageous not only 42 for scalability reasons - since it can compress information - but more importantly because it allows ISPs to abstract network endpoints into groups, thus ensuring privacy of network topology details whilst maintaining useful network guidance, as the ISP has full control of how endpoints are aggregated, and consequentially how traffic is engineered since this changes how clients interpret resources. A second resource type provided by the server is the cost map, which can be defined as a matrix M, where Mij - with i and j being the source and destination PIDs, respectively - is the associated path cost. The cost has two components: its metric and mode. The ALTO base protocol only defines a single, generic, cost metric called "routingcost". However, [72] is currently specifying more concrete metrics, with many associated with QoS evaluation, e.g., one way and round trip delay, packet loss and throughput. The other cost property, cost mode, can either specify that the metric is to be interpreted as a numerical value or as an ordinal ranking among all other costs in that cost map - this is useful in cases where too much network information is not deemed reasonable to share, and a simple order of preference that doesn’t expose excessive infrastructural details can suffice. The decision to separate network and cost map information into two types of resources comes from the reasoning that network mappings are unlikely to change, whereas cost mappings could be periodically updated. As such, it alleviates client applications from the need to retrieve redundant information, and gives them the ability to only retrieve a subset of it - this ability is further expanded in the map filtering service, which allows an ALTO client to further specify which regions of the requested maps it wishes to retrieve (much like a "SELECT" statement from an Structured Query Language (SQL) database), and only these are transmitted. Finally, the last two services focus on mappings that regard to specific endpoints, instead of abstract mappings that utilize PIDs. An endpoint is currently identified by one of the following: IP address, Media Access Control (MAC) address, or generic overlay ID. The endpoint property service maps to an endpoint a set of properties, e.g., geographical location or connectivity type, and the endpoint cost map has the same meaning of a cost map, but mapping to particular endpoints addresses and not abstract collections. The ISP has thus the ability to work with abstract aggregates or specific endpoints, showing as little or as much network information as it deems fit. As could be seen, the ALTO project specifies an architecture for sharing of networkrelated information, with well defined roles and a request-response protocol to fulfill interactions between them. It also attempts to standardize such interactions in the form of data structures with well defined attributes which are then to be manipulated 43 for each use case. This could then serve as a useful service for any application that wishes to retrieve network information as a means to improve its decision making at the application level. It is important to note that there are restrictions to what kinds of information are contemplated by the ALTO protocol - for example, transport-level congestion is beyond its scope, and thus should not replace conventional mechanisms. The type of data which is valid to consider, according to the group’s problem statement [73], should not be easily obtainable by the clients themselves - such as immediate end- to-end delay - and should be variable on a longer timescale than the instantaneous kinds that are seen on, for example, congestion control mechanisms, as the frequently resulting querying traffic would be counterproductive to the task of traffic optimization. Potentially valuable information that is in the ALTO scope would then have to be harder to obtain without aid of this service, and not highly mutable through time - for example, routing costs, geographical locations, network proximity, operator’s policies, scheduled down-times, historical application feedback, etc. This project is, at time of writing, still on-working, with many drafts being created and updated as the ALTO project matures and increases its domain applicability. These are, however, relating to service extension and deployment, since the main architecture, protocol design, implementation guidelines and security analysis are fully published into their respective Request for Comments (RFC) documents, serving as pillars for this work, and the ongoing efforts will serve as inspirations for potential extensibility. 2.5.3 Viability 2.5.3.1 Security Given the nature of this system, particularly the trading of sensitive network structure information that can alter application behavior, it is quite apparent that its design and implementation are not without challenges from a security perspective. Indeed, the working group published discussions regarding security preoccupations at the development and deployment stages of the ALTO system [73] [71] [74]. Utilizing the "STRIDE" threat model [75], the main threats to the ALTO architecture can be summarized as follows: •Spoofing of a legitimate ALTO server that would mislead clients with wrong information - this could give the malicious party the ability to change traffic 44 to its will. Spoofing of the clients themselves can also occur, and could allow a malicious party to retrieve sensitive network data outside their permission. Spoofing of a network status provider that could feed information into the server to be spread to applications, possibly misleading them in the same way an ALTO server spoofing could, but by proxy. •Tampering of data to mislead either ALTO servers or clients. If some unauthorized and malicious party can retrieve data that is in transit or storage and tampers with it, clients would act on information that they assume is trustworthy but in fact has been modified. As such, clients could be redirected to wrong addresses, or receive incomplete or incorrect data that results in bad and/or harmful decision making. On the other hand, data tampering that occurs in the communication channel between data providers and the ALTO server would give the latter, from a seemingly trustworthy party, untrustworthy data, and this would result in the same issues that could arrive from spoofing threats. Tampering could also occur in input forms in the server-client or server-provider interface with potential to inject malicious code execution. Finally, data tampering with the goal of simply destructing data could have the potential of ruining valuable information that would have taken much time and resources to retrieve, and be hard to replace. •Repudiation of being the source of some network information, whether it be by a third party that volunteered the data or the ALTO server itself, which would make it difficult to neutralize and attribute culpability to incorrect or malicious sources, jeopardizing the legitimacy of the provided network information. •Information disclosure in the form of ALTO resources being made available to entities that were not authorized to access it. These resources could give malicious parties insight of network topology status as well as the ability to derive the client’s network usage patterns by observing what kinds of resources they attempted to retrieve at a given moment. •Denial of service of the ALTO server through request flooding beyond its capability, which would severely hinder - or even negate - its ability to serve legitimate users. By proxy, service denial of external entities can also happen through the manipulation of ALTO resources themselves - leveraging the system’s potential to guide traffic, if a given resource is manipulated in such a way that unreason- 45 gates to ensure QoS levels needed by given application types, but never discriminating beyond such given classes. As the protocol is defined [71], the provided network status information is truthful and guidance is optional, and neutrality can then still remain outside of the system, since no routing measurements exist within it. If particular implementations of the ALTO system give guidance in such a way to guide traffic in a discriminatory fashion, and if such guidance has advantages that much outweigh any alternative, thus rendering it beyond optional, a case can be made for how ALTO as a concept can break network neutrality, considering all its advantages and disadvantages discussed below, as the ISP can utilize discriminatory behaviour to treat applications on their infrastructure differently. 2.5.3.5 Multi-Domain orchestration The Internet as we know it today spans the entire globe and is rather complex in nature. According to [30], the classic vision of the Internet consisting of a network of transit and stub ASs no longer seems accurate, as it now is much more complex - for starters, the role of network owner and service provider are separating, and Internet access is provided by numerous competing ISPs. Considering this administrative complexity in the Internet’s topology, it can thus be inferred that the act of layer cooperation can get harder when the influence domain increases and potentially spans many different ISP regions which will inevitably act differently as they can have different technologies, biases, policies, and overall goals. These per-ISP biases can make it difficult to guarantee that traffic optimization spanning multiple administrative domains is actually useful and achieves the cooperative nature in mind. For example, an ISP may not be comfortable categorising end-point costs of a given metric, thus making path calculations that pass through that ISP domain not viable. Regardless, per-domain ISP guidance has nonetheless plenty of potential, e.g., the ability to localize traffic, and similarly per-domain optimization of resources can still be useful when such domain is large, and can be applied to highvolume operations such as those in a data center. The ALTO server within a given domain can also leverage probing measurements and feedback statistics to derive information in areas whose topological details are unknown, giving a partial network view that contains topological insight and also information derivation that, whilst not being as good as a complete topological insight, may nonetheless power a cooperative effort within a given domain with good results. Some data may, however, be both not 52 shared by an external domain nor derivable. This includes endpoint property information, such as network connection types, or server footprints, e.g., available CPU, RAM and storage. This information can in some conditions only be retrieved by authoritative entities in a given domain and probing solutions may not be available, thus considerably limiting the applicability of a single ALTO domain. Even assuming that all ISPs are comfortable with sharing sufficient information, ambiguity may arise. For example, considering a cost map with the generic "routingcost" cost metric, ISPs could internally calculate routing costs differently, and prioritizing different goals, e.g., reducing overall link usage versus reducing inter-AS traffic first and foremost. The base ALTO protocol specification states that each network region can provide its ALTO services, which in turn convey network information from their perspective. A network region, per the protocol specification, consists of a given administrative domain, such as an AS, an ISP, or a given set of agreeing ISPs [71], thus implying that if multiple ISPs share an ALTO server they must reach a consensus on what network status is available for query from the outside. Furthermore, the ALTO working group’s deployment considerations [74] document states that an ALTO client can query a single server for one or many metrics, or he can additionally query multiple server instances on different networks. It is explicitly stated in the document that each server could give guidance for only a given network partition, and such guidance may wildly differ between them due to the fact that different algorithms and objectives may have been applied. The document also states that, in regards to extending the reachability of a single server, three different strategies could be applied: •Authoritative Servers: A given set of servers can provide guidance for all kinds of destinations to all ALTO clients. •Cascaded Servers: An ALTO server can possess an embedded ALTO client and query other neighbouring servers if it cannot serve the original request, acting as a middleman between the client and the more appropriate servers. •Inter-server Synchronization: Different ALTO servers communicate among themselves to expand the knowledge space. The last strategy is still being subjected to development and standardization by the working group as part of a bigger attempt to link different network regions and technologies into a single, homogeneous abstraction of the Internet. Current efforts in multi domain orchestration and relevant use case examples are summarized in the ongoing work of [89]. 53 2.6 summary In the evaluated case studies seen in this chapter, it can be clearly seen that there is room for improvement in application-layer traffic generation that can benefit both the applications themselves and the infrastructure administrators that support them. Applications struggle to achieve optimal network resource utilization, whether that be in the task of matching peers in overlay networks, deploying and attributing edge server to media clients, selecting mirror servers, etc., and solutions are being continuously proposed and created that attempt to optimize these decisions. Traffic optimization solutions vary between them in the range of control that is given to the overlay and underlay parties. It seems to be the case that one-sided solutions can hurt the other layer in a worst case scenario, and be lacking maximum efficiency and generating redundant probing traffic in the best. ALTO’s proposal seems to bridge the best of both types of proposals that are either underlay or overlay-centric, standardizing a system and associated protocol whose purpose is to achieve layer cooperation so proper network utilization is possible. Despite many of its associated challenges - namely in the regions of security, privacy, and incentivisation - the project certainly has the potential for a more resourceful Internet that can be more sustainable. 54 3SYSTEM ARCHITECTURE AND DEVELOPED MECHANISMS As the main proposed goal of this work is the implementation of a system that complies with the ALTO working group’s devised protocol, this chapter exhibits the planned software specifications needed to implement the system as a whole, with the aforementioned protocol being a crucial part of client-server resource exchange. Initial attention is given to the general architecture on Section 3.1, with the goal of identifying key entities, their purpose, and how they interact among themselves at the macro level. Following, Section 3.2reviews the planned access control methods to ensure the delineation and enforcement of rules about which users can do what actions on the system’s resources. The aforementioned ALTO resources can be considered the driving force behind the system, as they are what client entities seek, and what ISPs wish to provide, and an overview of their design is given on Section 3.3. Finally, Section 3.4 provides a more detailed specification of each of the main system roles. Within it, a overview of the interfaces and possible functions is given - regarding the ALTO client, how it retrieves server insight to help its application decisions; regarding the server, how it can be located, how it provides its data with optional query parameters, and how it can synchronize with other servers in another domain; for last, how the network state providers retrieve raw network information and gather it for administrator processing and subsequent upload into the ALTO server. 3.1 general architecture Figure 3.1presents a high-level conceptual model of how the network information flows in a given ISP. 55 Figure 3.1: Conceptual representation of the ALTO system within a given ISP 56 Network data originates in the topology itself, and is gathered into a network information aggregator by the appropriate means - this aggregator defines an interface through which network data can be uploaded, and entities utilize it to provide the network data they have collected. These entities will use different means to gather information, as the Internet is supported by a massive variety of protocols and standards for network and resource information querying. For example, a node could deploy a daemon listening for Open Shortest Path First (OSPF) protocol packets to gather path cost information, and another using SNMP to gather node property information. Obviously, since the interface simply defines how raw data must be formated to be accepted by the network information aggregator, means through which the data is uploaded are left to the source itself, and, because of this, static data uploads that were previously collected, such as ones residing in another system’s database, could be preferred over dynamic provisioning. The network information aggregator serves as a hub for network administrators to process the raw network data that was collected by the previous tier, and transform it into ALTO resources ready to be accepted and distributed by the corresponding server. This task of network information processing is where ISP policies and preferences are injected via, for example, the abstraction of network entities with the aggregation of network addresses into PIDs, and the creation of cost maps which result from the transformation of network link information mixed with given ISP goals. If, say, the administrator wished to provide a cost map between network entities which aimed to reduce inter-network traffic, it would firstly aggregate endpoints into abstract entities with common properties, as an attempt not to share too much infrastructural information, and then use the previously collected network link information, attribute higher costs to highly contested links, and transform it utilizing the Dijkstra’s algorithm to create a shortest path map that is bound to provider preferences. Such map is then parsed as an ALTO resource - more specifically, a cost map - and afterwards uploaded into the ALTO server with the access policies the administrator sees fit. More formally, Figure 3.2presents the proposed system architecture. 57 Figure 3.2: System architecture at a macro level 58 One can identify the ALTO interface, which is logically separated in its download and upload components, as a key factor of the system, since it allows to bridge three different application layers - the ALTO resource consumer, the ALTO server, and the network information aggregator, to be further specified in the following sections. The ALTO working group has extensively specified the ALTO protocol, which regards to resource querying, and the concrete implementation of this work will aim to comply to it. However, no resource provisioning protocol was, at time of writing, specified by the working group, nor has an interface been specified to allow network data to reach the ALTO server. It has been set as a work in progress, and the topic of network information sources was briefly discussed in [74]. The working group has grouped the tasks of raw network processing and supply into the role of the ALTO server. However, as seen in the aforementioned architecture in Figure 3.2, a different approach was taken in this work, with the roles being separated and an additional protocol proposed to bridge communication between them. This was made as an attempt to adhere to the philosophy of single responsibility, making the sole task of the ALTO server the management of ALTO resources. This aims to facilitate the independent development of the different roles, and make it easier to interchange implementations, which would make it particularly useful, for example, to deploy many ALTO servers in a cascade fashion whilst utilizing only a single network information aggregator. These are, however, only conceptually separated, and an implementation could, if it is more practical, merge the server and information provider roles into a single physical entity, mimicking then the architecture designed by the ALTO working group. A more distributed approach is then presented as an option, where multiple servers are separately deployed. To permit the data interchange and synchronization between multiple of these servers, an Inter-Domain Synchronization server is also included in the architecture as an centralized bridging entity between domains. As most software architectures, each new communication channel represents a possible source of attack vectors and, attending to the critical security concerns posed in Section 2.5.3.1, all of these channels must be secure and reliable, as signified by the padlocks on the presented architecture. This implies that data communications within it must block being read or altered by non authorized users, and the identity of the participating parties assured to be trusted and made accountable. The identified communication channels must then have methods of maintaining data integrity in transit, user authentication and authorization, and communication confidentiality. 59 3.2 role system As an access control measurement, the system will work with Role-Based Access Control (RBAC) methods which, as the name states, center their control policy logic around roles, which themselves are tags that can be attributed to users. A pre-requisite is then that users attempting to access a system employing RBAC must be authenticated as a given user, and with that assured, a list of attributed roles can be retrieved to validate if a given action is permitted according to the set rules. The ALTO resources have associated to each of them an Access-Control List (ACL), that maps, for a given set of roles, the list of user actions that are allowed to be performed to that resource, with the implicit rule that a resource’s owner has full clearance. The available user actions are "read", "update" and "delete", meaning the ability to get, change the contents of, or remove the resource, respectively. This ACL must be provided by the Network Information Aggregator whenever a new resource is inserted into the ALTO server. The ISP administrator that controls the aggregator not only then designs the resource itself - adding the information that it deems important whilst not too detailed to damage privacy - but also defining access control policies on that resource, which will be then enforced by the server in future requests. Employing access control based on roles seems appropriate for this system since roles can be applied to - and thus group - many users, and indeed that seems to be applicable on real case deployments of the ALTO system, where each given application, that consists of a great number of users, can correspond to a single group, and more private scenarios, such as a data center server cluster, can also be grouped. This facilitates permission management, as the RBAC approach allows grouping of permissions into roles, which inherently affect every user associated with it. This would contrast to an approach where permissions are set per user, which would be considerably harder to manage at scale. As a user can be granted many roles, he can naturally act on the system with a role that fits the currently queried resource, if so applies, and likewise the network administrator can give permissions per role, which in turn can group as many as millions of users, or to just a single one. An RBAC-based access control mechanism will help mitigate security threats pertaining to the ALTO working group’s architecture, e.g., having unwanted users reading or tampering with data. However, for such mechanisms to be viable at all, authentication systems need to also be employed to help verify that the users are indeed who they are announcing to be. Authentication mechanisms are, regardless, of extreme importance, as they additionally help mitigate spoofing security threats. Data 60 breaches are not, however, totally mitigated with authenticity and access control mechanisms. After an entity gets a resource and acts outside the system, it becomes out of its control and these mechanisms cannot be employed. This means that there are no guarantees that the resources are not to be shared outside of the system’s domain and consequentially there are no security guarantees after that point. Because of this, privilege attribution by the ISP administrators not only give clearance to do a certain action, but also imply that trust exists that these users will not be improper with the given resources, such as sharing it with users with improper clearance. Figure 3.3provides a high-level communication diagram of how access control is enforced. Figure 3.3: High-level communication diagram of a successful resource action request The ISP administrator that uploads the resource into the ALTO server appends to it an ACL that maps actions to the considered roles, with the implied meaning that those that weren’t considered have no permitted actions. When a resource consumer requests an action, which is expected to be a "read" one, and proper authentication was performed to verify its identity, the server checks that the roles associated with 61 tween endpoints and averaging the results as a means to fill the knowledge gap outside its domain. A "tput" cost matrix can be seen in Table 3.3c and 3.3d, specifying expected throughput in a numerical fashion with a value of bytes per second, and in an ordinal fashion with a ranking, respectively. The ISP applied probing measurements, topological insight, as well as collected feedback of previous application connections that occurred between endpoints to deduce excepted throughput between target points in practice. The ordinal mode of displaying information serves as a way to preserve relative preference information without requiring from the ISPs the need to concretely specify network status, and instead ordering connections by relative preference, with the option of assigning equal preference to paths that differ in a given order of magnitude that the ISP sees as negligible. Finally, the inclusion of cost calendar capabilities to the cost matrix in Table 3.3e enables users to get a chronological view of the excepted throughput at rush hours, with the single value cost being updated to the present time if a decision needs to be made only considering data pertaining to the time of request. In the presented example scenario, locality is correlated with more reliable communications and less operational costs from the ISP’s point of view, and a concrete better choice exists regarding routing cost, delay, and throughput, between any two peering connections. That information can be part of the ALTO system as query-eligible by client applications that can now better optimize their network-related decisions in a mutually beneficial scenario. The network status information of an endpoint property map stores the property information of a given endpoint. The ALTO working group’s protocol specification [71] does not directly specify what kind of properties are pondered for this map. Following the same design pattern used for the other specified resources, the endpoint property map will have a set of defined properties with associated semantics, and all other properties can be added with the "priv" prefix to designate private properties outside of the considered domain, and thus all semantics and validation rules don’t apply. Much like the other resources, an endpoint can be identified by an IPv4, IPv6, MAC or private overlay address, and the pondered properties are PID value, geographical coordinates, connection type (fiber, Asymmetric Digital Subscriber Line (ADSL), etc.), server footprint information (total RAM, CPU, and storage), and server status information (what portion of the footprint information is currently available, such as free processing power). In practice, a given property could be promoted from a private type to one pondered in the protocol and have a resulting official semantic and validation rules. Table 3.4 68 display an example endpoint property map, which is used to store status information relating to servers, identified by their IPv4address, that serve the same content. Endpoint CPU % RAM % Geographic Coordinates Connection type priv:is-mirror 145.132.164.101 22 50 (34.28278,-82.50490) Fiber False 245.217.176.67 30 45 (23.24178,-53.51290) Fiber True 48.43.96.168 25 30 (55.33218,-12.50490) Fiber True 207.20.148.21 10 20 (-23.28121,-22.55530) Fiber True 89.140.253.77 5 0 (12.231278,75.70890) Fiber True Table 3.4: Example endpoint property map for server replicas Finally, as a means to facilitate resource divulgence from servers to clients, there is also included the specification of an Information Resource Directory (IRD), that is also based from the ALTO working group’s protocol specification [71]. An IRD can also be thought of as a resource, but instead of sharing network information, it serves as an index of the available resources that a given server provides. Each server must have available for query a single IRD, that lists all the available resources it provides, along with their metadata. Each resource attribute must contain the resource’s ID, its HTTP media type and, if applicable, their capabilities, accepted input media types, and resource dependencies. The capabilities identify, if existing, the cost and property types that are used. Being indexed by their unique name, this allows for these to be cross-referenced on further protocol exchanges without need to repeat information. Additionally, the resource’s capabilities also serve to indicate what resource functionality extensions are enabled. These functionality extensions are currently applicable for cost maps only, and thus the capabilities serve to signal if the cost map has enabled one or more of the following functionalities: calendared costs, a protocol extension adapted from the work in progress in [70], that serves to retrieve calendar cost values; or the multi-cost extension functionality, a protocol extension adapted from [90], which lets multiple matrices be requested at once to save on overhead traffic that would otherwise be necessary to request many matrices. Two additions are made to the working group’s specification: firstly, a description field, which for each resource attribute gives a brief description of what it is about, as it could facilitate resource selection, since such a description could go into detail about appropriate usage guidelines of that resource and suggested use cases; secondly, the resource’s ACL, letting a user know beforehand what clearances the given resource has. 69 A default network map entry must also exist in the IRD, as per the working group’s specification, to serve as a guideline for clients that wish to use the most basic of ISP endpoint groupings. An example IRD is provided in Table 3.5. Cost ID Cost Mode Cost Metric Description routing routingcost numerical Default routing preference routing-rank routingcost ordinal Routing preference by ranking owd delay-ow numerical Expected one way delay of a single packet. Based on application statistics tput-theoretical tput numerical Theoretical maximum available TCP throughput. Based on topological knowledge tput-practical tput numerical Practical expected TCP throughput. Based on application statistics (a) Available cost types Property ID Property type Description cpu CPU Machine’s current CPU load ram RAM Machine’s currently occupied RAM coord geographic-coordinate Machine’s geographical coordinates connection connection-type Machine interface’s connection type is-mirror priv:is-mirror Flag stating if machine is a mirror of original server (b) Available property types Resource ID URI Media Type Uses Accepts Capabilities Description def-nmap resources/networkmaps/default alto-networkmap - alto-networkmapfilter - Default cluster-costmap resources/costmaps/cluster alto-costmap def-networkmap alto-costmapfilter Costs: [routing, routing-rank] For main data center cluster cluster-endprop resources/endpointpropmaps/cluster alto-endpointprop - alto-endpointpropparams Properties: [cpu, ram, coords] For main data center cluster client-endcost resources/endpointcostmaps/ alto-endpointcost - alto-endpointcostparams Costs: [routing-rank, owd, tput-practical] For user application guidance (c) Available resources Resource ID def-nmap (d) Default Network Map Table 3.5: Example of an ALTO server’s IRD A list of available costs and properties is shown in Table 3.5a and Table 3.5b, respectively, with their descriptive data discussed above, along with the available resources provided by that server in Table 3.5c, which contains data useful for their server cluster, as well as a broader-purpose endpoint cost map to query for path connection types and facilitate user selection. Finally, a default network map is included in Table 3.5d. 70 Further formal specification is not made as it has been extensively done in the ALTO protocol [71], and the proposed system complies to it whilst extending upon the design. 3.4 roles 3.4.1 ALTO Client An ALTO resource consumer is materialized in the architecture in the form of an ALTO client, which can be any entity who is able to interface with an ALTO server to query for ALTO resources. Whilst the ALTO working group was initially devised to help increase P2P-related traffic localization via the sharing of network information, it now has an increased scope where an ideal client is any application which generates network traffic and would be able to optimize it with aid from an oracle entity with privileged network information. Thus, an ALTO client is fit to be implemented in P2P applications, and could be embedded in a P2P client itself to help with picking neighbouring and content providing nodes, or on a tracker that would accomplish the same goal on behalf of the querying peer. Likewise, nodes which are unable to optimally select between other nodes, such as CDN controller nodes or selectors of mirror servers, could also benefit from oracle guidance, and thus qualify as appropriate ALTO clients. Figure 3.6exemplifies how a cooperative P2P application would, acting as an ALTO client, interact with the ALTO server to retrieve relevant network resources to aid their application choice of what candidate peer to consume a service from. 71 Figure 3.6: High-level communication diagram of a P2P application utilizing ALTO Firstly, a network map is retrieved to help group endpoints into groupings, and afterwards a cost map is retrieved filtering only the querying peer as source, candidate peers as destinations, and the routing cost and bandwidth cost matrices. Acting on this information, the peer chooses the candidate that gives a good balance between ISP routing cost and path bandwidth, making a decision that should ideally benefit both them and the ISP that helped provide that information. Figure 3.7is similar to the previous example, in the sense that it aids a P2P application by resorting to ALTO’s guidance, but this time the application-level traffic optimization is made in a way that is transparent to the P2P client. 72 Figure 3.7: High-level communication diagram of a tracker utilizing ALTO As a choice to purely localize traffic, as this alone can bring plenty of benefits to both layers, and as a means to minimize protocol modification, it is the tracker that acts as an ALTO client. Whenever a request is made by a P2P client to retrieve peers serving a given data chunk, the tracker first consults with the ALTO server and retrieves its network map that groups peers within administrative domains: either inside the providing ISP’s domain, thus the local network, and outside administrative domains, grouped by types of peering connections to different autonomous regions. The tracker could use a very simple algorithm to filter out of its candidate pool peers that reside outside of the ISP region where the requesting P2P client resides, if a local alternative exists. After packaging a reply to the P2P client, the protocol acts normally and traffic could be successfully localized with minimal impact. In the same vein, Figure 3.8exemplifies how this time a CDN controller would use the system to better help its decision in matching CDN clients to an edge server on their system. 73 Figure 3.8: High-level communication diagram of a CDN controller utilizing ALTO To do this, it retrieves a property map to query for server status information, and subsequently retrieves a cost map to query for path information between the CDN client and the candidate edge servers. Having all the relevant server status information, e.g. available processing and storage resources, as well as connection properties, e.g. max possible bandwidth, latency, and packet loss, the CDN controller is in a condition to more optimally redirect his client. 3.4.2 ALTO Server An ALTO resource provider is the ALTO server, an entity that possesses pre-processed and authorized network information in the form of ALTO resources. Its job is to store and manage such resources so they can be provided to querying ALTO clients, with the additional responsibilities of data validation and persistence. Conceptually, the ALTO server is seen as a single entity, but considering the sensible information that could be stored within it and the influence it has on shaping network traffic, it would not be uncommon for an ALTO server to have a knowledge domain correspondent to the ISP that owns it. Physically, though, the resource provider layer could consist of many interlinked ALTO providers with an increased coverage area of network knowledge. Means through which this could occur are further specified in Section 3.4.2.3. A listing of available HTTP endpoints of the ALTO server interface is available in Table 3.6. 74 HTTP Verb Resource Description GET /resources Retrieve the Information Resource Directory for that server GET /resources/networkmaps Get summary overview of all available network maps POST /resources/networkmaps/ Add a new Network Map GET /resources/networkmaps/{id} Get the Network Map with the specified ID POST /resources/networkmaps/{id} Get the Network Map with the specified ID, with the applied filter provided in body PUT /resources/networkmaps/{id} Modify the contents of a Network Map with the specified ID DELETE /resources/networkmaps/{id} Remove a Network Map with the specified ID GET /resources/costmaps Get summary overview of all available cost maps POST /resources/costmaps Add a new Cost map GET /resources/costmaps/{id} Get the Cost Map with the specified ID POST /resources/costmaps/{id} Get the Cost Map with the specified ID, with the applied filter provided in body PUT /resources/costmaps/{id} Modify the contents of a Cost Map with the specified ID DELETE /resources/costmaps/{id} Remove a Cost Map with the specified ID GET /resources/endpointpropmaps Get summary overview of all available Endpoint Property Maps POST /resources/endpointpropmaps Add a new Endpoint Property map GET /resources/endpointpropmaps/{id} Get the Endpoint Property Map with the specified ID POST /resources/endpointpropmaps/{id} Get the Endpoint Property Map with the specified ID, with the applied filter provided in body PUT /resources/endpointpropmaps/{id} Modify the contents of an Endpoint Property Map with the specified ID DELETE /resources/endpointpropmaps/{id} Remove an Endpoint Property Map with the specified ID GET /resources/endpointcostmaps Get summary overview of all available Endpoint Cost Maps POST /resources/endpointcostmaps Add a new Endpoint Cost Map GET /resources/endpointcostmaps/{id} Get the Endpoint Cost Map with the specified ID POST /resources/endpointcostmaps/{id} Get the Endpoint Cost Map with the specified ID, with the applied filter provided in body PUT /resources/endpointcostmaps/{id} Modify the contents of an Endpoint Cost Map with the specified ID DELETE /resources/endpointcostmaps/{id} Remove an Endpoint Cost Map with the specified ID Table 3.6: ALTO server’s available endpoints All resource types hierarchically descend from a "resources" path, and each unique type of resource exposes his own endpoint, with the methods to add, update, remove, and retrieve with and without filter as arguments. These methods are subjected to the access control mechanisms discussed in Section 3.2, as one should only expect reputable sources to upload and modify data, and only permitted users to query it. 3.4.2.1 Resource filtering Resource filtering is the task through which a resource consumer can pass a filter object to the resource provider that specifies the parameters that the consumer wishes to retrieve specifically. With it, there’s no need to pass more information to the client than he wishes to get, thus minimizing used network bandwidth and client CPU cycles to send and process the resource, respectively. The need for filtering becomes a greater necessity, and perhaps a critically needed one, at a larger system scale, i.e., with an increased number of users that query routinely, and resources that can have a massive amount of entries, specifically those that regard to network endpoints. Keeping with the objective of implementing a fully compatible ALTO protocol as specified by the working group, so will the resource filtering specifications be equal to those already specified in the protocol design [71], thus no further specification will be necessary. For clarification, the ALTO server must maintain an endpoint for retrieving all main specified network status resources via filtering, i.e. the server must let the client re- 75 trieve ALTO resources with parametrization that dictates what concrete fields must be delivered. The types of resource filters considered are the following: •Network Map filter: List of PIDs of value PID_List, that if empty signifies the entire subset of available . All entries of value: (PID,Endpoint_List),PID ∈PID_List must be retrieved, and all others must be filtered out. •Endpoint Property Map filter: Pair of list of endpoints and list of properties that must be selected, of value (Endpoint_List,Property_List). All entries of value (Endpoint,Property),Endpoint ∈Endpoint_List ∧Property ∈Property_List must be retrieved, and all others must be filtered out. •Cost Map filter: Tuple of list of source PIDs, list of destination PIDs, list of cost types and list of cost value conditionals of value (SrcPID_LIST,DstPID_LIST,CostType_List,CostValueConditional_List), with CostType_List >1 assuming a multi-cost map extension and the emptiness of a list signifying the entire subset of available values that the list refers to. All entries of value (Src_PID,Dst_PID,Cost_Type,Cost_Value,CostValueContidional_List), Src_PID ∈SrcPID_List ∧Dst_PID ∈DstPID_List ∧Cost_Type ∈ CostType_List ∧satis f ies_atleast_one(Cost_Value,CostValueConditional_List) must be retrieved, and all others must be filtered out. •Endpoint Cost Map filter: Equal to the cost map filter, but considering a list of source and destination endpoint filters instead of PIDs. By analogy, one can consider the ALTO server to act as a remote database with an interface for clients to interact with it, and the filters act as selection statements, such as the "SELECT" method in SQL databases, to retrieve specific parts of the dataset. The filters of cost maps and endpoint cost maps also include a list of premises which themselves are logical operators applied to the candidate cost values. Continuing the analogy, these allow the clients to use "WHERE" statements on the numerical cost values that are retrieved. In summary, the filter functionality could be explained in the demonstrative examples shown in Table 3.7. 76 HTTP Verb Resource Body Description POST resources/networkmaps/default { "pids": ["PID1", "PID2"] } Retrieve a network map with id "default", filtering for the entry PIDs "PID1" and "PID2" POST resources/endpointpropmaps/default { "endpoints": ["ipv4:10.0.0.1", "ipv4:10.0.0.2"], "properties": ["CPU", "RAM", "connection-type"] } Retrieve an endpoint property map with the id "default", filtering for the entries with the properties "CPU", "RAM", and "connection-type" and the IPv4endpoints "10.0.0.1" and "10.0.0.2" POST resources/costmaps/default { "cost-type": { "cost-mode" : "numerical", "cost-metric": "routingcost" }, "pids": { "srcs" : ["PID1"], "dsts": [] } } Retrieve the cost map with the id "default", filtering for the entries with the cost matrix having cost mode "numerical" and cost metric "routingcost", whose entries have source PID "PID1" and any destination POST resources/costmaps/default { "multi-cost-types": [ { "cost-mode" : "numerical", "cost-metric": "routingcost" }, { "cost-mode": "ordinal", "cost-metric": "routingcost" } ], "pids" : { "srcs": ["PID1", "PID2"], "dsts" : ["PID3"] } } Retrieve the cost map with the id "default" and, assuming a multi-cost protocol extension, retrieve both the "numerical" and "ordinal" variations of the "routingcost" metric, whose entries have source PID "PID1" or "PID2", and destination "PID3" POST resources/costmaps/default { "multi-cost-types": [ { "cost-mode" : "numerical", "cost-metric": "routingcost" }, { "cost-mode": "numerical", "cost-metric": "delay-ow" } ], "calendared": [false, true], "pids" : { "srcs": [], "dsts" : ["PID3"] } } Retrieve the cost map with the id "default" and, assuming a multi-cost and cost calendar protocol extensions, retrieve the numerical variants of the "routingcost" and "delay-ow" metrics, requesting a singular value and a calendar value respectively, of all entries whose destination is "PID3" POST resources/costmaps/default { "multi-cost-types": [ { "cost-mode" : "numerical", "cost-metric": "delay-ow" }, { "cost-mode": "ordinal", "cost-metric": "routingcost" } ], "pids" : { "srcs" : ["PID1"], "dsts" : ["PID2"] }, "or-constraints" : { [ ["[0]ge 0","[0]le 20"], ["[1]eq 1"] ] } } Retrieve the cost map with the id "default" and, assuming a multi-cost protocol extension, retrieve the "numerical" mode of the "ow-delay" metric and the "ordinal" mode of the "routingcost" metric, whose entries have source "PID1" and destination "PID2", and whose cost values satisfy for a given source and destination pair that either the "ow-delay" is within 0and 20 ms or it’s the "routingcost" value with a preferencial value of 1 Table 3.7: Example ALTO queries with the filtering functionality 77 4IMPLEMENTATION Following the specification, the aim of this chapter is to overview aspects of the implementation stage of the proposed ALTO system. Firstly, attention is given in Section 4.1to the chosen technologies that were leveraged to get the system from its specification stage into a working product. This includes tools and frameworks in the development and deployment phases, and whose choice greatly delimits the system’s properties. Secondly, the server is put into spotlight in Section 4.2by detailing how it is structured and how it behaves, taking special concern in how object oriented programming was leveraged to maximize modularity and reasoning of the system to facilitate future alterations and extensions. Brief implementation overviews are given of the Network Information Aggregator and Network State Providers in Section 4.3 and Section 4.4, respectively, commenting where they are similar and where they differ from the ALTO server’s implementation. 4.1 technologies used Starting the implementation stage of every project, attention must be given into what tools are selected to make it come to fruition. These can greatly impact the success of the developed software, and has concrete consequence in its maintenance and future extensions. The specified system architecture is composed by key entities whose interactions are bound by clearly defined interfaces. More so, considering the example deployment scenarios, its evident that each entity resides in different topological regions throughout the network, with the ALTO server, clients, and status providers being scattered throughout an ISP domain. Each entity can then be thought of as a self-contained system in of itself who must abide by the proposed interfaces to properly work on the system. A logical conclusion to this is that each entity implementation is independent from the next, needing to only assure a common communication channel that all entities within it can properly understand. This gives great flexibility in the system implementation as a whole, because different tools can be leveraged to different enti- 85 ties if needed, and that such entities can be worked on independently from the rest without impacting the function of the group. Regarding the ALTO server, first attention is given to the ALTO resources that must be provided by it. They all share some common properties, such as resource id, ACLs, owner, etc., and functionality, such as the ability to be read and updated, or their permissions modified. This similarity is further intensified within groups of resource types, more specifically cost maps. In these resources, the only concrete difference between an endpoint and a PID cost map is the type of entity the costs refer to, which are endpoint and PID addresses, respectively. The sequence of steps that must be taken from the initial point where a client requests a resource up until that resource is provided can be abstracted as the sequential interaction between concrete modules that have a given, self contained, purpose, and communicate with a common interface. This is an architectural pattern that is a micro version of the one existing in the system, that shares all its properties that were discussed previously. Some of these modules would include client request monitoring, its parsing, its validation, database retrieval, database storage, and serialization. With all this in mind, an object-oriented programming seems like a proper fit for the complexity pertaining to the ALTO server, especially considering how future extensions would be likely, as very much will be in case of the ALTO working group. By working with objects as the base programming entity, many of the highlighted similarities between resources will become easy to be put into evidence, and module encapsulation and interfacing are natural and thus arguably easier to develop and maintain. Importance is also placed in choosing a compiled language that is statically typed. This is due to the fact that a compiled language favors performance over an interpreted alternative, which seems favourable for the expected scale of the ALTO system, and typed constrictions provide needed structure verifications that aid in the programmer’s confidence in its reliability, and often helps reduces mistakes. The language choice finalizes with Java [92], which matches the given requirements and is the one with most prior personal development experience, coupled with its maturity and wide access to libraries and frameworks. The Java Spring framework [93] is a main component of the developed server software. The framework’s inversion of control paradigm allows dependencies to be managed through configuration files and annotations to identify objects to be scanned by the framework, providing a means of development that is quite flexible, reduces boilerplate code, and favors loose coupling between objects, facilitating the independent development of implementations that can themselves be changed in the future with little consequence to the entire system, given that they implement the stipulated interface. 86 Adding to this, the Spring framework provides modules that are very much needed for the server implementation, namely for Model-View-Controller (MVC) architectures, HTTP-based Representational State Transfer (REST) Application Programming Interfaces (APIs), authentication and authorization, data access, and both unit and integration testing, to name a few. Given that other frameworks could provide similar functionality, Spring was favored due to its development team’s focus on performance and flexibility, and because the framework has continuous development support and an increased community popularity, all of this raising the likelihood that this framework becomes maintained throughout the future, in comparison to some that have since lost support. Finally, focus was given for database-related decisions. Since resource manipulation through the REST APIs revolve around JavaScript Object Notation (JSON) manipulation, a preference was made for a database that allows the resources to be saved in a similar fashion, thereby reducing a layer of abstraction that makes reasoning about the software easier. Considering the scale at which an ALTO server might be subjected to requests, a database that favors performance seems like a better choice, in particular one that easily allows for horizontal scaling. A last consideration is made for a database that is schema-less, since for the network information aggregation server, a myriad of types of data can be added by state providers to account for the huge variety of protocols and standards that retrieve network information, and more can exist in the future that weren’t initially pondered by the ISP administrator, as more network protocols and data properties become relevant to attain, so a flexibility in what can be stored seems more appropriate. In a similar vein, for the ALTO server, the ALTO protocol itself has been subject to continuous changes that still aim for legacy support, it can be argued that future changes will be common, and doing so without increased server downtime - something that would be required by schema-driven databases - seems favorable considering the scale and importance of an ALTO service. The existence of private properties whose scope is outside of the protocol and can be freely defined by the user, while not impossible to implement with a schema, seems to lend itself more naturally to a schema-less design. With all these considerations in mind, a database that abides to these constrictions and has a healthy developer support and user adoption is MongoDB [94], which was chosen. As per security, the same philosophy of the ALTO working group will be used and pre-existing, mature technologies will be leveraged. Hypertext Transfer Protocol Secure (HTTPS) will be used over base HTTP as a communication protocol between entities as a means to resolve many of the identified security threats. By using certificates 87 with HTTPS, the server entity authentication can be assured, and through the usage of Transport Layer Security (TLS) as a cryptographic security tool, both confidentiality and integrity are secured in the communication channel via the usage of data encryption and digest calculation, respectively. As per client authentication, a deliberate choice was made to use HTTP basic [95], as opposed to HTTP digest [96] that is demanded by the base ALTO working group’s specification. With basic authentication, user and password fields are sent in encoded - not encrypted - fashion, and such information is firstly validated by the server that, if the attempt is successful, proceeds with its normal operation. Due to the lack of encryption, this method of client authentication will be complemented with the usage of HTTPS to provide a secure communication channel that would otherwise be open to credential exposure and tampering. The working group’s suggested digest method hashes the credentials by using a nonce - a number to be used only once - that was provided by the server, thus also protecting against data exposure and tampering. However, since HTTPS will be leveraged, there’s no need to have an authentication system that does much more beyond of what HTTP basic does, therefore facilitating client applications and giving the server flexibility on how they wish to store user credentials, since the basic authentication allows one to store the hash of passwords alone, whereas digest requires the storage of the hash value of "username:password:realm". These and other comparisons between these authentication methods are available at [97] and further helped in the decision. 4.2 server architecture The macro-level architectural diagram specified that the server’s role is to serve incoming requests by clients and providers, and to interface with a database to persist resource storage. The server will implement a REST interface leveraging HTTP as this pair is widely accepted and ubiquitous on the Internet, but also due to the fact that its resource-oriented interface standards fit nicely into the specified interface for ALTO server interactions, which too revolve around resource manipulation, and by adhering to proper REST designs good scalability can be achieved due to its stateless nature and potential for resource caching. The choice of HTTP as an application protocol fits nicely into a philosophy of leveraging existing and well proven protocols and technologies to increase the project’s success, and indeed so was done to integrate authentication and encryption mechanisms. 88 To accomplish this interface implementation, the internal server architecture will utilize the MVC design pattern. This three-layered architecture consists firstly by a controller layer that intercepts communication requests, which after parsed and validated are redirected to the business layer, which in turn employs business logic to help satisfy the controller’s requests, which may require a subsequent layer descent into the data layer via database queries. Figure 4.1displays a class diagram focusing on controller classes that deal with resources that are not susceptible to version control - this includes every resource except the network map. Figure 4.1: Controller layer class architecture for unversioned resources As can be seen, all concrete controllers - such as an endpoint property map controller - are extensions to a generic controller class that is parametrized by its Data Transfer Object (DTO) , filter DTO, and service instances. This design choice was made because all controller logic that regards to resources without version control are the same, and by creating generic classes with type parametrization code reutilization is increased. The parametrization required by the controller is required to pass a concrete instance of the unversioned resource service generic class, which in of itself requires parametrization in resource DTO and resource filter DTO. By reflecting on common controller and service behaviour between all resources lacking version control, the conclusion was that working around generic classes maximizes reutilization, facilitates reasoning and decreases potential error. To help better visualize the result, refer to how the generic controller is implemented in Listing 4.1. 89 Listing 4.1: Parametrized Controller class for unversioned resources public class ParametrizedUnversionedResourceController <ResourceDTOType , ResourceFilterDTOType , ResourceServiceType extends ALTOUnversionedResourceService <ResourceDTOType , ResourceFilterDTOType> > { private fi nal ResourceServiceType resourceService ; @Autowired public ParametrizedUnversionedResourceController ( ResourceServiceType resourceService ) { this . resourceService = resourceService ; } @PreAuthorize( " @ResourceAuthorizationService . hasPermission ( authentication , #resourceId , T(com. example . restser v ice . dto . security . PermissionDTO ) .READ) " ) @RequestMapping ( method = RequestMethod .GET, value = " { id } " ) public ResourceDTOType getResource ( @PathVariable ( value = " id " ) String resourceId ) { return resourceService . getResource ( resourceId ) ; } @PreAuthorize( " @ResourceAuthorizationService . hasPermission ( authentication , #resourceId , T(com. example . restser v ice . dto . security . PermissionDTO ) .READ) " ) @RequestMapping ( method = RequestMethod .POST, value = " { id } " ) public ResourceDTOType getCostMapWithFilter ( @PathVariable ( value = " id " ) String resourceId , @Valid @RequestBody ResourceFilterDTOType costMapFilterDTO ) { return resourceService . getResource ( resourceId , costMapFilterDTO ) ; } } To retrieve a resource, simply call the service class with or without the proper filter, depending on which method was triggered, by calling the appropriate methods that must implement the resource service interface. For example, an endpoint property map controller implementation simply extends the generic controller by providing the concrete DTO, filter DTO, and service implementations, as seen in Listing 4.2. Listing 4.2: Concrete controller extending from a parametrized one @RestController @RequestMapping( "endpointprops") public c l ass EndpointPropertyMapController extends ParametrizedUnversionedResourceController <EndpointPropertyMapDTO , EndpointPropertyMapFilterDTO , EndpointPropertyMapService> { @Autowired public EndpointPropertyMapController ( EndpointPropertyMapService resourceService ) { super ( resourceService ) ; } } The same reasoning was used to implement the network map controller, but since this is the only resource that accepts versioning, the correspondent generic controller behavior does not contain similar behavior to the one above, and thus another was created, as seen in Listing 4.3. 90 Listing 4.3: Parametrized controller class for versioned resources public class ParametrizedVersionedResourceController <ResourceDTOType , ResourceFilterDTOType , ResourceServiceType extends ALTOVersionedResourceService <ResourceDTOType , ResourceFilterDTOType> > { private fi nal ResourceServiceType resourceService ; @Autowired public ParametrizedVersionedResourceController ( ResourceServiceType resourceService ) { this . resourceService = resourceService ; } @RequestMapping ( method = RequestMethod .GET, value = " { id } " ) @PreAuthorize( " @ResourceAuthorizationService . hasPermission ( authentication , #resourceId , T(com. example . re s tservice . dto . security . PermissionDTO ) .READ) " ) public ResourceDTOType getVersionedResource ( @PathVariable ( value = " id " ) String resourceId , @RequestParam ( value = " version " , required = false) String resourceVersion) { return resourceVersion != null ? resourceService . getResourceVersion ( resourceId , resourceVersion ) : resourceService . getLatestResourceVersion ( resourceId ) ; } @PreAuthorize( " @ResourceAuthorizationService . hasPermission ( authentication , #resourceId , T(com. example . re s tservice . dto . security . PermissionDTO ) .READ) " ) @RequestMapping ( method = RequestMethod .POST, value = " { id } " ) public ResourceDTOType getVersionedResourceWithFilter ( @PathVariable ( value = " id " ) String resourceId , @RequestParam ( value=" version " , required = false ) String resourceVersion , @Valid @RequestBody ResourceFilterDTOType resourceFilter ) { return resourceVersion != null ? resourceService . getResourceVersion ( resourceId , resourceVersion , resourceFilter ) : resourceService . getLatestResourceVersion ( resourceId , reso u rceFilter ) ; } } The service layer implementation must now let the controller retrieve either a specific version of a resource, or the most recent one if no version is specified by the client. The purpose of some pieces of the shown code isn’t immediately obvious, and will be now further explained. Starting with input validation, the usage of the "@Valid" annotation on an endpoint controller parameter signifies that the framework must initialize a validator class that should examine and validate that input against the defined rules. The rules are defined on the DTO class whose instance is to be passed by the client into the server, and validation annotations from the framework are leveraged to define attribute-specific rules. Listing 4.4, for example, includes the "@JsonProperty" annotation that defines optional and obligatory fields in the de-serialization step, and whenever needed, more types of attribute validation annotations were used, including 91 non-blank strings, non negative integers, and values within a certain discrete set of possibilities. Listing 4.4: Cost map DTO class @Document( collec t ion = "CostMaps" ) public c l ass CostMapDTO { @JsonIgnore @Id private String id ; @NotNull @Indexed ( unique = true ) @Field("meta " ) private MetaDataDTO metaDataDTO ; @NotNull @Field(" cost −map" ) private Map<String , Map<String , Integer >> costMappings ; @JsonCreator public CostMapDTO( @JsonProperty ( value = " meta" , required = true ) MetaDataDTO metaDataDTO , @JsonProperty ( value = " cost −map" , required = true ) Map<String , Map<String , Integer >> costMappings) { this . metaDataDTO = metaDataDTO ; this .costMappings = costMappings ; } public String getId ( ) { return id ; } public void setId ( String id ) { this . id = id ; } public MetaDataDTO getMetaDataDTO ( ) { return metaDataDTO ; } public void setMetaDataDTO (MetaDataDTO metaDataDTO) { this . metaDataDTO = metaDataDTO ; } public Map<String , Map<String , Integer >> getCostMappings ( ) { return costMappings ; } public void setCostMappings (Map<String , Map<String , Integer >> costMappings ) { this .costMappings = costMappings ; } } For class-wide validation, custom validator classes were created and afterwards annotated into the class in question. For example, for the cost map filter DTO, which defines the filter that is passed by the client whenever cost map filtering is selected, a custom validator class was created and annotated with "@ValidCostParametrization". This class implements the class-wide restrictions imposed in the ALTO protocol regarding cost map filters, which dictate that a user can only select either a single or 92 multi-cost map request, and whenever calendarization is requested, the total count of cost types requested must match the number of flags that dictate if a given cost type must provide its calendar form. Assuring both attribute and class-wide rule definition and enforcement, the system can validate all user input to maintain system correctness. Another element from the shown controller implementations is the "@PreAuthorize" annotation. These, and similar others, are part of the Spring security module and serve as constriction setters that, if not successful, do not let the annotated method be executed. This is the basis for access control in the server system, as is shown in Listing 4.3, retrieving a resource using the GET method requires that a given constraint is verified. This constraint verification process is handled by a specially created authorization service that receives authentication information, the resource id in question, and what action is being requested - in this case being "READ". This is how all access control restrictions upon ALTO resources is implemented - with uploaded resources containing an ACL mapping user roles to allowed actions, all controller access must first verify that the given authorized user is authorized to perform that action. The authorization service, seen on Listing 4.5, exposes a "hasPermission" method in its interface and is tasked with confirming if the following action is allowed considering the system’s constrictions and the upload entity’s defined access control rules. Listing 4.5: Excerpt of the resource authorization service @Service(" ResourceAuthorizationService " ) public class SingleProviderResourcePermissionsResourcesAuthorizationService implements ResourcesAuthorizationService { public boolean hasPermission ( Authentication authentication , Str ing resourceId , PermissionDTO permissionDTO ) { i f ( authentication instanceof AnonymousAuthenticationToken ) { // User must be authenticated return f als e ; }else { // Get roles the user has attributed to him List <String > userRoles = getRoleNames ( authentication . getAuthorities ( ) ) ; return hasGeneralActionPermission ( userRoles , permissionDTO ) && hasResourcePermissions ( userRoles , resourceId , permissionDTO ) ; } } /* *Implementation */ } 93 To retrieve a specific version of a resource, query-focused build methods are retrieved from the versioned repository class, and network map specific processing is added to apply network map projections, which in this case means retrieving only the specified PIDs. A good API must be aware of possible errors that may occur, and communicate these to the client in a way that is easy to understand. To achieve this, a global exception handling mechanism was used with the aid of the "@RestControllerAdvice" annotation, that is tagged to a class that will consequently catch and process controller-thrown exceptions, which themselves could’ve been propagated from the service, mapper, or repository layers. It then centralizes the error handling aspect that is then focused in building the correct error packets that contain the appropriate HTTP code and a message with helpful details. These message details are extracted directly from the thrown exception, but it is important to assume that these are to be exposed to the clients, and thus should not contain heavy implementation details for developers, with logging instead taking that role. Listing 4.10 shows the main exception handler used. Listing 4.10: Main exception handling class @RestControllerAdvice public class MainExceptionHandler { @ExceptionHandler ( { Exception . class }) @ResponseStatus (INTERNAL_SERVER_ERROR) public ErrorMessageDTO handleAllOtherExceptions ( Exception ex ) { return new ErrorMessageDTO(INTERNAL_SERVER_ERROR. value ( ) , ex . getMessage ( ) ) ; } @ExceptionHandler ( AccessDeniedException . class ) @ResponseStatus (FORBIDDEN) @ResponseBody public ErrorMessageDTO PermissionError ( AccessDeniedException ex ) { return new ErrorMessageDTO(FORBIDDEN. value ( ) , ex . getMessage ( ) ) ; } @ExceptionHandler ( MethodArgumentNotValidException . class ) @ResponseStatus (BAD_REQUEST) @ResponseBody public ErrorMessageDTO validationError ( MethodArgumentNotValidException ex ) { return new ErrorMessageDTO(BAD_REQUEST. value ( ) , ex . getMessage ( ) ) ; } @ExceptionHandler ( { NotFoundException . class } ) @ResponseStatus (NOT_FOUND) public ErrorMessageDTO handleResourceNotFoundException ( Exception ex ) { return new ErrorMessageDTO(NOT_FOUND. value ( ) , ex . getMessage ( ) ) ; } @ExceptionHandler ( { MultipleInformationResourceDirectoriesException . class } ) @ResponseStatus (INTERNAL_SERVER_ERROR) public ErrorMessageDTO handleMultipleInformationResourceDirectoriesException(Exception ex) { return new ErrorMessageDTO(INTERNAL_SERVER_ERROR. value ( ) , ex . getMessage ( ) ) ; } } 100 4.3 network information aggregator The Network Information Aggregator behaves very similarly to the ALTO server, in the sense that it is an HTTP REST server that exposes an interface for the addition, modification, and deletion of resources, with the actions being pre-validated with an authentication and access control mechanisms. Also equal is the database access pattern to a MongoDB document used to store the network status information. The concrete differences come from the fact that whereas the ALTO server’s managed assets are ALTO resources, the ones managed by the Network information Aggregator are network status measurements. Because of this, most of the implementation decisions remained the same and no technologies were added or removed from those chosen for the ALTO server’s implementation. Thus, implementation details of this module will not be expanded upon due to their redundant contents. As per data pre-processing by the administrator, pre-existing tools were used. More concretely, the Mongo shell was used to directly query the database, and Curl was used to send POST requests to the ALTO server with finalized resources. 4.4 network state providers The network state provider module is the one that can most horizontally scale in future system iterations. This is due to the fact that, like previously said, the Internet consists of a big variety of different protocols and technologies responsible for maintaining the network’s infrastructure. Because of this, it would be needed that a state provider is developed for each type of network status data that is required for the ISPs to provide the clients with useful data. For the purpose of this project, a provider was created with a simple script that collected values that were statically stored in csv files that stored link and endpoint properties for the test network to be used in the experiments phase. Afterwards, it uploaded those values using the POST verb of the REST API enabled by the network information aggregator. 101 5EXPERIMENTS The purpose of this chapter is to overview the experimentation phase of the project, which contains the work done to deploy and measure how applications behave when using either classic or ALTO-guided solutions when faced with some of the constructed scenarios, that force some decision which impacts the underlying network. Whereas the developed unit tests in the implementation stage aim to verify the correct functionality of separate units of code pertaining to the system, the execution of the entire system as a whole to serve a set of hypothetical use cases can help achieve a better grasp on how correctly the system behaves. Adjacent to the goal of testing the system’s behavior in an emulated environment, the experimentation phase also aims to embed in such environment a list of case study scenarios where applications could leverage the ALTO system to their advantage, and subsequently observe and measure if and how the ALTO server can help the client with its network insight that guide the client in taking application decisions that aim for a win-win scenario between the overlay and underlay. As comparison, other known application-network interaction strategies will also be observed and their results measured as a means to compare their impact in comparison to one that utilizes the implemented system. Findings on existing application-layer traffic optimization interactions and the proposal of the ALTO protocol made on Chapter 2, together with the specified system extensions on Chapter 3leads one to believe that a theoretical mutually beneficial scenario exists in an ALTO approach that could not exist in one where only one of the layers gets all the input when applying traffic optimization decisions. This chapter, however, puts those theoretical scenarios into a practical environment that could be replicated by those reading this work, and exposing the created scenarios and collected data can aid in corroborating the theoretical conclusions, as well as leave an opportunity for future discussion on how the system behaved, including its performance, its success in aiding clients, other existing client options that could be a better route, system shortcomings, etc. In general, this discussion benefits the ALTO project and can give more maturity to the system as it was put through multiple test scenarios against other common strategies. 103 Section 5.1displays the chosen technologies for tasks pertaining to the experiments. Section 5.2focuses on the required steps taken to setup the testing environment, which includes the design and deployment of a network topology to be emulated, the creation of mock applications to serve as clients for the system, and the design and deployment of application and network status measurement tools. Section 5.3follows with the individual overview of the devised scenarios to be executed, and with it experiment specifics such as the initial problem, what strategies will be tested to solve it, how many runs will be made per strategy, what metrics will be measured, and finally the obtained results and discussion on it. 5.1 technologies used The Common Open Research Emulator (CORE) [98] was used as a network emulator and represents the backbone of the experiments as a whole as it will serve as the background for the running scenarios. This tool allows for the creation and emulation of network environments, and with it are included the abilities to construct network topologies and manipulate properties of the member nodes, which can include network routers, switches, and host machines, that will all be used for the designed experiment scenarios. Additionally, link connection properties can themselves be customized, as parameters like maximum bandwidth, packet loss percentage, or packet delay can be meticulously customized, and in fact will be in the upcoming scenarios as a means to simulate a given circumstance that may occur in a realistic environment, such as link inefficiency that results from peak traffic hours. Another property that was of great importance for the selection of CORE on this work is that, on top of the virtual network environment, arbitrary code can be run on behalf of a given entity and can be addressed to another, acting as if it were an actual network. This will be leveraged to run software pre-packaged in the emulator, such as routing protocols that are essential for the correct expected behavior of a network, but also to schedule software execution that was developed for this work, which includes the ALTO server, network state providers - e.g., probing daemons and application feedback collectors - and system clients for the P2P and HTTP mock applications that will be devised to play out a particular experiment scenario, and which will have embedded into it an ALTO client to interface with the server for council. As the simulation tool runs on Linux and builds a simulated network that behaves very much like a real one, well known real-application tools can be used on top of it in other needed areas, includ- 104 ing the deployment and measuring phases, which gives plenty of flexibility on tool selection. The execution of arbitrary code on the network nodes is accomplished with the vcmd [99] tool, that runs the specified commands in control channels that are created at runtime by CORE - for example, the command in Listing 5.1executes a ping to address "10.0.0.1" with origins on node "P2P-Client-1", and on simulation session "12345": Listing 5.1: Execution of an example command through the control channel of a given node $ vcmd -c /tmp/pycore.12345/P2P-Client-1 -- ping 10.0.0.1 Python [100] will be utilized to implement all simple software prototypes whose purpose is uniquely to test the application in a real scenario. This includes the P2P file-transfer applications, the HTTP servers and clients. Appended to this programming language will also be the task of application monitoring, which includes the retrieval of performance statistics - doing so in the application’s code itself, instead of using external tools, because more fine grained access exists and individual tasks can be monitored for how long and how well they perform. The choice of this language over others is simply because these software prototypes are not intended to be highly optimized, nor are they to be complex. Instead, their mode of operation is supposed to be simple in nature, to remove complex variables that might make the experiment results harder to infer upon, and to make reasoning and replication of experiment results easier. Python seems then like a good fit due to its easy syntax, its interpreted nature that skips work that would otherwise be needed for compilation that might increase performance - but is not required - and, finally, its massive collection of helpful libraries. Finally, for the task of network monitoring, to collect data representative of the impact that a given application strategy had in the infrastructure, the Linux file accessible in "/proc/net/dev" will be read in the virtual environment of each node, which contains the total amount of bytes that entered and left their interfaces during the scenario’s run. Parsing all the data from each node and grouping them by area and AS is performed on a shell script, following the execution of the given scenario, and utilizing common text manipulation tools such as awk [101]. 105 5.2 setup Figure 5.1displays the topology that will act as the main environment for all the devised experiments, with partitioned views to be subsequently introduced. Figure 5.1a presents a simplified global view the network as a collection of ASs. It was designed with the intent of reflecting, at a smaller scale, the structure of the Internet, in particular with it being an aggregation of multiple, heterogeneous, domains, each with their own topological properties and internal policies, with them being administrated by different organizations. A single backbone network, shown on Figure 5.1b, provides connectivity between many ASs and, to do its job correctly, a high degree of path redundancy exists between its routers, and the links have better capabilities than those associated with stub networks. Figure 5.1c shows AS1, a simple topological structure consisting of five computers and three dedicated servers, connected with the help of switches and routers, that eventually connect to a single edge router that links with the backbone. Figure 5.1d shows AS2, which is representative of a data center with two OSPF areas, both constructed with a hierarchical organization common for data center networks. Links in these regions are also highly capable and high traffic peak times are expected to occur. AS3, shown in Figure 5.1e, is a transit network which is slightly more complex than AS1, but has the same structure, with the addition of having three OSPF areas instead of two, and a variety of nodes and links with different properties - for example, the links in area A are generally better, whilst area C has wireless connections in it that are expected to have worse performance and be less reliable. Finally, AS4, depicted on Figure 5.1f, connects directly with AS3. It consists of a stub network containing many end users and some servers, and both node and link properties vary accordingly. Each node on the network has a given purpose that is represented as a node label, and link labels are used to specify connection properties. Unless stated otherwise with these labels, all other properties are equal throughout the network. The only exception are the properties of wireless networks, which cannot be seen on the figures - all wireless connections on the topology have a bandwidth of 5Mbps. Some pre-packaged CORE services need to be enabled to assure network connectivity - mainly Open Shortest Path First Version 2(OSPFv2)and BGP - and Python scripting is used to - leveraging the Linux system and the CORE Python API, at the beginning of the simulation, bootstrap programs in specific nodes and test the connectivity of the entire network. 106 (a) Global view of the network, integrating multiple ASs (b) Detailed view of AS0 (c) Detailed view of AS1 107 (d) Detailed view of AS2 (e) Detailed view of AS3 108 (f) Detailed view of AS4 Figure 5.1: Network topology and integrating ASs 5.3 scenarios This section describes the four devised scenarios to test the impact to the overlay and underlay that results of applications performing traffic optimization decisions with and without the implemented ALTO solution. Section 5.3.1focuses on a P2P application who needs to decide, whenever a file fragment is served by multiple peers, with whom to establish connection. Section 5.3.2tackles the issue of an HTTP server subjected to periodic load spikes, and how clients can selectively choose the timing to initialize the resource request. Section 5.3.3deals with the challenge of selecting a given HTTP server to retrieve a content from, with a mirror cluster available. Finally, Section 5.3.4deals with a reverse proxy interfacing with a client user looking for HTTP content, and how it cooperates with a network administrator to maintain sustainable packet loss levels. Each variable method of each scenario was executed ten times, and their average values were collected and, in case of transfer and/or execution times, their minimum and maximum values. 5.3.1 Peer selection in P2P file transfer 109 Being assumptions, however, means that this correlation could not be guaranteed. Instead, it is crucial that such data comes from an authoritative entity with specifics about the network infrastructure, and fully aware of the impact that the guidance they provide can have. Since the two ALTO approaches work with different sets of data, an ideal cooperative solution could work with both datasets - one focused on locality information, and another on network connection metrics - and attempt to achieve a balance between optimal network resourcefulness and application performance. 5.3.2 HTTP resource request scheduling 5.3.2.1 Overview In this scenario, "Server1", in AS1, acts as a server of HTTP content. "Cli1", of the same AS, wishes to retrieve a 500 megabyte file from that server in one single session. As they wish to present the file in a browser, and since the file is constructed in such a way that it enables the client to render data as it is sent, a minimum bandwidth of 10 Mbps is set for an appropriate client experience. The server is subjected to random client loads that affect processing and storage power, as well as periodic traffic loads within its AS whenever the server clusters in that system exchange data between themselves for server redundancy and general synchronization. These two actions are then expected to penalize the server’s ability to deal with client requests. For experimentation purposes, this will be translated in practice as the dynamic variation of the available bandwidth of the single link which is directly connected to the server. This has direct impact on the theoretical maximum available bandwidth from "Cli1" to the server, whose values are chronologically setup as specified in Table 5.4: Simulation time (s) Max bandwidth (Mbps) 0-180 2 180 -360 3 360 -540 5 540 -∞10 Table 5.4: Maximum available bandwidth from client to server considering dynamic link capacity variation The server administrator is aware of the request loads that the server is subjected to, as well as the routine data transfers that exist within the AS, and identifies a pattern of behavior where server conditions have periods of higher and lower ability to operate. 116 As an attempt to optimize application decisions, he previously monitored server and network conditions, which allowed him to reasonably predict how these will impact the server’s performance in the future. The ALTO server local to "Cli1" maintains a calendar cost map displaying the information mentioned in Table 5.4, i.e., it informs the client about the expected available bandwidth in the present and future. The variable action to be tested is how the HTTP client selects when to initialize its content request with the server. Table 5.5displays the different client algorithms that will be tested for the task of server request scheduling. Client Algorithm Description Immediate Immediatelly request the resource from the server Bandwidth Request the file using wget and, after five seconds, which is sufficient to get a view of the transfer performance, restart the transfer unless a value of 10 Mbps or higher was reported ALTO Retrieve a calendar cost map from the local ALTO server of expected available bandwidth from itself to the server, and initiate immediately when the value is expected to be 10 Mbps or higher Table 5.5: Client algorithms to be tested in scenario 2 Table 5.6presents the measurements that will be collected during the experiment runs. Measurement Units Description Transfer Time Seconds Total amount of time taken from file request to total file retrieval Network Traffic Megabytes Total amount of traffic that passed through each area in AS1 Table 5.6: Measurements to be taken in scenario 2 5.3.2.2 Analysis of results Figure 5.4shows the obtained transfer times for each of the variable methods in scenario 2. It appears that the ALTO-aided and bandwidth-probing methods were equally circling at 439 seconds of transfer time, and an approach of immediately querying the server was the slowest, at 801.19 seconds. 117 Figure 5.4: Scenario 2transfer time results Figure 5.5shows the measured traffic influx. It appears that the method that used bandwidth probing mechanisms took a considerable traffic overhead compared to the other two alternatives. 118 0 100 200 300 400 500 600 700 800 900 1,000 Bandwidth ALTO-Global Immediate 6.21 ·10−2 6.46 ·10−2 5.25 ·10−2 6.22 ·10−2 6.44 ·10−2 5.22 ·10−2 6.3 ·10−2 6.36 ·10−2 5.23 ·10−2 6.12 ·10−2 6.12 ·10−2 5.23 ·10−2 6.25 ·10−2 6.28 ·10−2 5.39 ·10−2 6.43 ·10−2 6.34 ·10−2 5.51 ·10−2 6.55 ·10−2 6.51 ·10−2 5.48 ·10−2 6.2 ·10−2 5.98 ·10−2 5.08 ·10−2 6.41 ·10−2 6.44 ·10−2 5.64 ·10−2 6.41 ·10−2 6.57 ·10−2 5.44 ·10−2 6.29 ·10−2 5.98 ·10−2 5.41 ·10−2 20.7 15.01 16.75 782.19 548.19 555.03 6.65 ·10−2 6.63 ·10−2 5.94 ·10−2 Traffic influx by region (MB) AS1 AS1-AreaA AS1-AreaB AS2 AS2-AreaA AS2-AreaB AS3 AS3-AreaA AS3-AreaB AS3-AreaC AS4 AS4-AreaA AS4-AreaB AS4-AreaC Figure 5.5: Inbound traffic flux by network areas measured in scenario 2 119 It seems to be that, unsurprisingly, query timing had a big impact on total file transfer time, as it would relate to the available bandwidth during file transfer. Both the probing and ALTO-aided strategies were able to correctly identify when the server was least overwhelmed by other clients, which justified their improved transfer time results in comparison to immediately querying the server. However, these do not have similar impacts on network resources. Deducing that information without ISP input required that a massive amount of overhead data be generated into the network, that not only used network resources in a sub-optimal manner, but also added to the increase of the server’s already overloaded capacity, which would, in a real-case scenario, further decrease the server’s ability to handle client requests. One could note that, in alternative to continuously probing the network, the client could use some exponential backoff strategy to space out consecutive probing measurements, but that would, at the very least, generate an undesirable amount of overhead traffic and server load, and could never be more quick and efficient than retrieving historical server pattern information from a reliable source. This last method was exactly what the ALTO approach did, which was able to nullify any need to generate overhead traffic besides a very small request for the ALTO resource, and simply waited to retrieve the content when the server was most available to, benefiting both sides and contributing to a more sustainable server-client architecture and the health of the entire network. 5.3.3 HTTP mirror selection 5.3.3.1 Overview In this scenario, "Cli2", in AS1, wishes to retrieve a 500 megabyte file from a server. After querying for the public index, a file is provided which contains an address lists of the four mirror servers that provide that content. Since the client goal is to retrieve a static file and no real-time requirement exists, the application mostly favors throughput and accepts packet delays which aren’t excessive, meaning more than 100 milliseconds of round-trip time, for this case. The listing is shown in Table 5.7, where, for comparative reference, information is given about each mirror’s location, i.e., the area and AS where they reside. Additionally, the connection is also described with metrics from the perspective of the querying client. These metrics include the maximum theoretical bandwidth as the minimum link bandwidth in the optimal path from "Cli2" to each server regarding this metric, and the sample RTT measurement the client obtained after 10 sequential ping commands prior to the scenario’s start. 120 Server address AS Area Max bandwidth(Mbps) Sample RTT (ms) 10.0.16.12 1 B10 0.807 10.0.37.10 2 A10 1.013 10.0.23.11 2 B10 1.060 10.0.13.10 3 B5 1.475 Table 5.7: Description of the available server mirrors in scenario 3 The mirror servers will be subjected to constant loads at the start of the scenario, representative of the quantity of users they would be serving at the time, which are translated as throughput throttling applied from the client to the servers when the file transfer begins, that specifically are the ones shown in Table 5.8. Server address CPU Load (%) Throughput throttle (Mbps) 10.0.16.12 95 3.0 10.0.37.10 80 5.0 10.0.23.11 40 10.0 10.0.13.10 80 5.0 Table 5.8: Client transfer throughput throttling to be applied if it chooses each given mirror server in scenario 3 The ALTO server local to that client provides global ALTO resources, including an endpoint property map that contains CPU load information about all the mirrors, as well as an endpoint cost map containing information about the expected throughput and delay from the client to the mirror. The variable action to be tested is how the HTTP client selects which mirror server to retrieve the file from. Table 5.9displays the different client algorithms that will be tested for the task of mirror selection. Client Algorithm Description Random Randomly select a server Bandwidth Probe the mirrors for maximum path bandwidth using iperf3 and average RTT using 10 ping commands, and select the one with most bandwidth whose delay doesn’t cross 100 ms ALTO Retrieve the global endpoint property maps and endpoint cost maps by querying for the CPU load property, and both throughput and RTT cost metrics, respectively, and choose the one which maximizes throughput, assuming that it has delay below 100 milliseconds and processing load is below 50%, so not to overload the server. Table 5.9: Client algorithms to be tested in scenario 3 121 Table 5.10 presents the measurements that will be collected during the experiment runs. Measurement Units Description Transfer Time Seconds Total amount of time taken from requesting a file to receiving it in full Network Traffic Megabytes Total amount of traffic that passed through each area network and AS Table 5.10: Measurements to be taken in scenario 3 5.3.3.2 Analysis of results Figure 5.6shows the obtained transfer times for each of the variable methods in scenario 3. An approach of randomly choosing mirror servers had the average performance of 1038 seconds, and the TCP bandwidth measuring method was slightly behind at 940 seconds. Finally, the ALTO-aided approach was the quickest with 440 seconds of transfer time. Figure 5.6: Scenario 3transfer time results Figure 5.7shows the measured traffic influx into the network’s ASs and their areas. It appears that the approach that probed for path bandwidth incurred in increased 122 overhead traffic being captured in the network regions, whereas the remaining approaches had a negligible amount in comparison, for those same regions. The increased traffic in AS1for the ALTO method meant that this strategy more often chose to retrieve content from a server outside network locality. 123 0 100 200 300 400 500 600650700 Random Bandwidth ALTO-Global 8.59 ·10−2 5.59 ·10−2 5.34 ·10−2 1.1 5.51 ·10−2 5.34 ·10−2 7.62 ·10−2 5.46 ·10−2 5.37 ·10−2 7.46 ·10−2 5.41 ·10−2 5.24 ·10−2 7.71 ·10−2 5.59 ·10−2 5.48 ·10−2 1.1 7.36 5.43 ·10−2 7.97 ·10−2 5.81 ·10−2 5.44 ·10−2 1.1 7.72 0.4 0.96 15.59 7.4 0.56 13.79 5.56 ·10−2 1.46 28.31 7.43 1.19 14.59 5.61 ·10−2 548.2 548.16 548.18 274.2 330.16 551.71 Traffic influx by region (megabytes) AS1 AS1-AreaA AS1-AreaB AS2 AS2-AreaA AS2-AreaB AS3 AS3-AreaA AS3-AreaB AS3-AreaC AS4 AS4-AreaA AS4-AreaB AS4-AreaC Figure 5.7: Inbound traffic flux by network areas measured in scenario 3 124 It seems like the random mirror selection tied to the worst transfer time on the worst case scenario, likely due to the fact that most of the servers were under load, and randomly selecting the best one, over many runs, was unlikely. Note that a random selection can be seen as an approach with advantages over what happens in current applications utilizing mirrors that give the user the chance to select it himself. In these, it is common for the first choice to be picked, and mirror servers often aren’t properly used, whilst the main server becomes increasingly overworked, as was discussed in Section 2.3.2. Thus, a random mirror selection strategy can at the very least distribute query loads throughout the mirror cluster. In this situation, however, this did not contribute to better application performance, but had every client in this scenario decided for load-distributing strategies, perhaps the cluster could increase its ability to better serve clients. A bandwidth probing approach was able to correctly identify which servers possess the highest possible path bandwidth. This, however, did not take into account the server’s current load, something which had direct impact on the application’s performance. Even worse, this approach took increased traffic overhead since an expensive bandwidth approximation measurement had to be performed for all mirror servers. Additionally, to allow the usage of the iperf3tool to deduce available network bandwidth, it assumed that the servers hosted a service that made these measurements possible, and this could not always be assumed for real-case situations. The ALTO approach was able to get immediate ISP input in the form of a combined multi-ALTO domain effort. The data contained information regarding connection properties, but also included very critical data about the server’s current load. This information was crucial to give the client the ability to unambiguously pinpoint the server that would optimize its request performance, and such information was impossible to deduce without third-party influence. The only way to mimic this without ALTO would be if the servers themselves provided an API for server status querying, which does not seem to be common in real-case scenarios. If it were, however, it would be very much useful since, much like the ALTO system, it would leverage privileged network information to achieve better performance and network infrastructure resourcefulness. Another advantage of this ALTO scenario is that, by selecting servers which are less overloaded, they contribute to a better load distribution, and, like the random selection strategy, this too could massively improve the entire cluster’s ability to serve, were every client to follow the same common strategy, which benefits both the overlay and underlay. 125