Advanced Software Engineering
Lecture 8: Data Center
by
Agenda
Introduction
Design and Construction
Management and Maintenance
Hot Topics
Real‐time traffic analysis
SDN
Wireless Data Center Networking
Core Elements of a Data Center
Applications
Databases – Database Management
System (DBMS) and the physical and logical
storage of data
Servers/Operating Systems
Networks
Storage Arrays
3An Example
Consider an order processing system consisting of: Application for order entry. Database Management System (DBMS) to store customer and product information. Server/Operating System on which the Application and Database programs are run. Networks that provide Connectivity between Clients and the Application/Database Server Connectivity between the Server and the Storage system. Storage Array Local Area Network Storage Area Network Storage Array Client Server Application User Interface DatabaseAn Example ..Closer Look
A customer order is entered via the Application
User Interface on a client.
Local Area Network Storage Area Network Client Server Application User Interface Storage ArrayAn Example ..Closer Look
A customer order is entered via the Application
User Interface on a client
The client accesses the Server over a Local Area
Network.
Storage Area Network Client Server Storage Array Local Area NetworkAn Example ..Closer Look
A DBMS uses the operating system on the server
to read and write this data to the physical
location on a disk.
Storage Area Network Client Server O/S and DBMS Storage Array Local Area NetworkAn Example ..Closer Look
A DBMS uses the operating system on the server to read and write this data to the physical location on disk. A Network provides the communication link between the server and the storage array, and transports the read/write commands and data between the server and the storage array. Storage Area Network Client Server Storage Array Local Area NetworkAn Example ..Closer Look
A DBMS uses the operating system on the server to read and write this data to the physical location on disk. A Network provides the communication link between the client and the server, and transports the read/write commands and data between the server and the storage array. A storage array receives the read/write commands and data from the server and performs the necessary operations to store the data on the physical disks. Storage Area Network Client Server Storage Array Local Area Network DatabaseGoogle Data Center
at Lenoir, North Carolina
http://www.google.com/about/datacenters/inside/s
Gallery
Elements of a Data Center
The Site Command Center Cable Management Network Infrastructure Terminal Servers Environmental Controls PowerStructural Aspects
a raised floor ceiling
Basement data center locations near water are not a good idea. Their must be a pathway for equipment to be moved in & out of
the data center.
Make sure the floor where the data center is to be located is
Power and Environment
Dual street power supply
with UPS
When necessary, a diesel
generator as a second
backup
Environmental Control
Facilities
Temperature
Moisture
dust
HVAC
Networking
3‐layer architecture
Core Layer Switch/Router
Layer‐2 Switch
Internal NIC Ethernet
connection
DLink 48ports Gbps Layer-2 Switch
Security
Physical Access
Levels of Access
Past to Future
¾
a single computer occupied the space of an entire
Data Center.
¾
That same space can be occupied by thousands
of servers today.
Let us Make it Online
HW
SW
Rack
Deployment and Testing
Maintenance
Servers
Tower Low cost, customized Space cost, not for parallel computing Blade • save space, high computing ability • suitable for large‐size data center Rack Server • small, easy to manage • need good coolingRack Unit (RU)
Unit=44.45mm (height) Width=19‐inch or 23‐inch 1U, 2U, 4U (half rack) 1U 4UData Center Topology
Internet Servers Layer-2 switch Access Data Center Layer-2/3 switch Aggregation Layer-3 router Core Top of Rack SwitchTop of
Rack (ToR)
Switch
Data Center Costs
James Hamilton published basic 2008 breakdown Servers: 45% CPU, memory, disk Infrastructure: 25% UPS, cooling, power distribution Power draw: 15% Electrical utility costs Network: 15% Switches, links, transitPower Cost
Approximate distribution of peak power usage by
hardware subsystem in one of Google’s datacenters (circa 2007).
Data Center Challenges
Traffic load balance
Support for VM migration
Achieving bisection bandwidth
Power savings / Cooling
Network management (provisioning)
Security (dealing with multiple tenants)
Non‐Virtualized Data Centers
Too many servers for too little work High costs and infrastructure needs Maintenance Networking Floor space Cooling Power Disaster RecoveryWhat is Virtualization?
Run multiple OSes and user applications on the same hardware e.g., run both Windows and Linux on the same laptop
How is it different from dual‐boot? Both OSes run simultaneously
Reduce costs by consolidating services
onto the fewest number of physical machines
Dynamic Data Center
Virtualization helps us break the “one service per server” model Consolidate many services into a fewer number of machines when workload is low, reducing costs Conversely, as demand for a particular serviceincreases, we can shift more virtual machines to run that service
We can build a data center with fewer total resources,
since resources are used as needed instead of being dedicated to single services
VM Workload Multiplexing
Multiplex VMs’ workload on same physical
server
Separate VM sizing VM multiplexing s1 s2 s3 We expect s3 < s1 + s2. Benefit of multiplexing !Two Types of Hypervisors (or VMM)
Hypervisor is a software layer that allows several VMs to run
on a physical machine The physical OS and hardware are called the Host VM OS and applications are called the Guest VMware ESX, Microsoft Hyper‐V, Xen Hardware Hypervisor VM1 VM2
Type 1 (bare‐metal)
Host Guest Hardware OS Process Hypervisor VM1 VM2Type 2 (hosted)
VMware Workstation, Microsoft Virtual PC, Sun VirtualBox, QEMU, KVM Host Guest Process Process Process ProcessBare‐metal or Hosted?
Bare‐metal Has complete control over hardware Doesn’t have to “fight” an OS Hosted Avoid code duplication: need not code a process scheduler,memory management system – the OS already does that
Can run native processes alongside VMs
Familiar environment – how much CPU and memory does a VM take? Use top! How big is the virtual disk? ls –l
Easy management – stop a VM? Sure, just kill it!
A combination
Mostly hosted, but some parts are inside the OS kernel for performance reasons, e.g., KVM
51 51
VM on Multi‐core CPUs
Each core can be configured for multiple VMs A Quad‐core CPU could be configured as a 32 node multi‐computer Limiting factor is often memory. Each guest OS has its own requirements (512 MB?)Installing a Virtual machine
Base OS is Windows 7
First install Sun VirtualBox as hypervisor
Then, Guest OS will be Ubuntu 12.04.1
Installing Sun/Oracle VirtualBox
Installing VirtualBox
Installing VirtualBox
Installing VirtualBox
Installing Ubuntu VM
Installing Ubuntu VM
Installing Ubuntu VM
Installing Ubuntu VM
Installing Ubuntu VM
Installing Ubuntu VM
Data Center Topology
Internet Servers Layer-2 switch Access Data Center Layer-2/3 switch Aggregation Layer-3 router Core Top of Rack SwitchMotivation
Flow‐based traffic monitoring
Volume of processed data is reduced
Popular flow statistics tools
Cisco NetFlow
sFlow
What is sFlow?
Accurate sampling is simple enough to be performed in hardware, at wire speed. Good accuracy under heavy loads Detailed complete packet header and switching/routing information for L2‐L7 traffic flows. Scalable capable of monitoring networks at 10Gbps, 100Gbps and beyond. Thousands of devices can be monitored by a single sFlow Collector. Low Cost sFlow Agent is very simple to implement and adds negligible cost to a switch or router. Timely an up to the minute view, for real‐time controls. QoS and DoS attack.Switching ASIC
1 in N sampling
sFlow in Operation
packet header src/dst i/f sampling parms forwarding user ID URL i/f counters
sFlow agent forwarding tables interface counters sFlow Datagram eg 128B rate pool src 802.1p/Q dst 802.1p/Q next hop src/dst mask AS path communities localPref src/dst Radius TACACS sFlow Collector & Analyzer Switch/Router
Statistical Model for Packet Sampling
N
n
c
N
c=
⋅
Total number of frames = N Total number of samples = n Number of samples in class = c Number of frames in the class estimated by:Relative Sampling Error
0% 25% 50% 75% 100% 1 10 100 1000 10000
Number of Samples in Class
% E rro r c %error ≤196⋅ 1 Estimating Traffic per Protocol
Even so, Data Volume is Huge!
Short‐term period of flow data Massive flow data from anomaly traffic data of Internet worm and DDoS Cluster file system and cloud computing platform Google’s programming model, MapReduce, big table Open‐source system, Hadoop Flow data in our campus network ( /16 prefix )# of Routers 1 Day 1 Month 1 Year
1 1.2 GB 13 GB 156 GB
5 6 GB 65 GB 780 GB
10 12 GB 130 GB 1.5 TB 200 240 GB 2.6 TB 30 TB
An Experiment: Travel Booking Website
Traditional Flow‐based Traffic Monitoring
Run on a high performance central server
Flow Data Routers High Performance Server Storage 75Occupancy of Different Network Service Types
Software Defined Networking (SDN)
What is SDN? Background An OS for networks What is OpenFlow? How it helps SDN The current status & the future of SDN Conclusions 79Limitations of Current Networks
80
Million of lines of source code 5400 RFCs Barrier to entry 500M gates 10Gbytes RAM Bloated Power Hungry Many complex functions baked into the infrastructure OSPF, BGP, multicast, differentiated services, Traffic Engineering, NAT, firewalls, MPLS, redundant layers, … An industry with a “mainframe‐mentality”
We have lost our way
Specialized Packet Forwarding Hardware Operating SystemApp App App
Routing, management, mobility management, access control, VPNs, …
Operating System Operating System
Reality
App App App Specialized Packet Forwarding Hardware Specialized Packet Forwarding Hardware Specialized Packet Forwarding Hardware Operating SystemApp App App
• Lack of competition means glacial innovation • Closed architecture means blurry, closed interfaces • Vertically integrated, complex, closed, proprietary • Not suitable for experimental ideas • Not good for network owners & users • Not good for researchers
Glacial process of innovation made worse
by captive standards process
Deployment Idea Standardize Wait 10 years • Driven by vendors • Consumers largely locked out • Lowest common denominator features • Glacial innovationOld Ways to Configure a Network
Specialized Packet Forwarding Hardware
App App App
Specialized Packet Forwarding Hardware
App App App
Specialized Packet Forwarding Hardware
App App App
Specialized Packet Forwarding Hardware
App App App
Specialized Packet Forwarding Hardware Operating System Operating System Operating System Operating System Operating System App App App
No control plane abstraction for the whole network!
It’s like old times – when there was no OS…
Wilkes with the EDSAC, 1949
Idea: An OS for Networks!!!
Specialized Packet Forwarding Hardware
App App App
Specialized Packet Forwarding Hardware
App App App
Specialized Packet Forwarding Hardware
App App App
Specialized Packet Forwarding Hardware
App App App
Specialized Packet Forwarding Hardware Operating System Operating System Operating System Operating System Operating System App App App
Idea: An OS for Networks
Specialized Packet Forwarding Hardware
App App App
Specialized Packet Forwarding Hardware
App App App
Specialized Packet Forwarding Hardware
App App App
Specialized Packet Forwarding Hardware
App App App
Specialized Packet Forwarding Hardware Operating System Operating System Operating System Operating System Operating System App App App
Network Operating System
Control Programs
Idea: An OS for Networks
Simple Packet Forwarding Hardware Simple Packet Forwarding Hardware Simple Packet Forwarding Hardware Simple Packet Forwarding Hardware Simple Packet Forwarding Hardware Network Operating System Control Programs 88Idea: An OS for Networks
“NOX: Towards an Operating System for Networks” Global Network View Protocols Protocols Control via forwarding interface Network Operating System Control ProgramsSoftware‐Defined Networking (SDN)
89Windows (OS) Windows (OS) Linux Mac OS x86 (Computer) Windows (OS) App App Linux
Linux MacMacOS OS Virtualization layer App Controller 1 App App Controller 2 Virtualization or “Slicing” App OpenFlow Controller 1 NOX (Network OS) Controller 2 Network OS
Trend
Computer Industry
Network Industry
Outline
What is SDN? Limitations of current networks The idea of Network OS What is OpenFlow? How it helps SDN The current status & the future of SDN Conclusions 92OpenFlow
“OpenFlow: Enabling Innovation in Campus Networks” Like hardware drivers – interface between switches and Network OS 93OpenFlow
94Data Path (Hardware)
Data Path (Hardware)
Control Path (Software)
Control Path (Software)
OpenFlow
95
Data Path (Hardware)
Data Path (Hardware)
Control Path
Control Path
OpenFlow
OpenFlow
OpenFlow
OpenFlow
Controller
Controller
OpenFlow Protocol
SSL‐TCP
Network OS
Control Program A Control Program B
OpenFlow Basics
IBM 10 gigabit ethernet OpenFlow switch G8264, which has 48×10 GbE SFP+ ports and 4 × 40 GbE QSFP+ ports
OpenFlow Switching
97 Controller PC Hardware Layer Software Layer OpenFlow Table MAC src MAC dst IP Src IP Dst TCP sport TCP dport Action OpenFlow Client * * 5.6.7.8 * * * port 1 port 4 port 3 port 2 port 1 1.2.3.4 5.6.7.8Control Program A Control Program B
Network OS
Flow Table
Packet Forwarding Packet Forwarding Packet Forwarding Packet Forwarding Packet Forwarding Packet Forwarding Flow Table(s) Flow Table(s) “If header = p, send to port 4” “If header = ?, send to me” “If header = q, overwrite header with r, add header s, and send to ports 5,6”Flow Table
Rule(exact & wildcard) Action Statistics Rule
(exact & wildcard) Action Statistics Rule
(exact & wildcard) Action Statistics
Rule
(exact & wildcard) Default Action Statistics
Flow 1.
Flow 2.
Flow 3.
Flow Entry
Match fields Match against packets Action Modify the action set or pipeline processing Stats Update the matching packets MatchFields Action Stats
In Port Src MAC
Dst MAC
Eth
Type Vlan Id IP Tos
IP
Proto IP Src IP Dst
TCP Src Port
TCP Dst Port
Layer 2 Layer 3 Layer 4
1. Forward packet to port(s) 2. Encapsulate and forward to controller 3. Drop packet 4. Send to normal processing pipeline 1. Forward packet to port(s) 2. Encapsulate and forward to controller 3. Drop packet 4. Send to normal processing pipeline 1. Packet 2. Byte counters 1. Packet 2. Byte counters
Examples
Switching * Switch Port MAC src MAC dst Eth type VLAN ID IP Src IP Dst IP Prot TCP sport TCP dport Action * 00:1f:.. * * * * * * * port6 Flow Switching port3 Switch Port MAC src MAC dst Eth type VLAN ID IP Src IP Dst IP Prot TCP sport TCP dport Action 00:20.. 00:1f.. 0800 vlan1 1.2.3.4 5.6.7.8 4 17264 80 port6 Firewall * Switch Port MAC src MAC dst Eth type VLAN ID IP Src IP Dst IP Prot TCP sport TCP dport Action * * * * * * * * 22 dropExamples
Routing * Switch Port MAC src MAC dst Eth type VLAN ID IP Src IP Dst IP Prot TCP sport TCP dport Action * * * * * 5.6.7.8 * * * port6 VLAN Switching * Switch Port MAC src MAC dst Eth type VLAN ID IP Src IP Dst IP Prot TCP sport TCP dport Action* * vlan1 * * * * * port6, port7,
port9 00:1f..
OpenFlow Usage
Controller PC OpenFlow Switch OpenFlow Switch OpenFlow Switch Alice’s code Alice’s code Decision? OpenFlow Protocol Alice’s Rule Alice’s Rule Alice’s Rule Alice’sRule Alice’s Alice’s RuleRule
10 3
OpenFlow Usage
Controller PC Alice’s code Alice’s code 10 4 » Alice’s code: ˃ Simple learning switch ˃ Per Flow switching ˃ Network access control/firewall ˃ Static “VLANs” ˃ Her own new routing protocol: unicast, multicast, multipath ˃ Home network manager ˃ Packet processor (in controller) ˃ IPvAliceOpenFlow
Standard way to control flow‐tables in commercial switches and routers Just need to update firmware Essential to the implementation of SDN 105Centralized/Distributed Control
Centralized Control OpenFlow Switch OpenFlow Switch OpenFlow Switch Controller Distributed Control OpenFlow Switch OpenFlow Switch OpenFlow Switch Controller Controller “Onix: A Distributed Control Platform for Large‐scale Production Networks”, UNIX OSDI 2010.Virtualizing OpenFlow
Network operators “Delegate” control of subsets of network hardware and/or traffic to other network operators or users Multiple controllers can talk to the same set of switches Imagine a hypervisor for network equipments
Allow experiments to be run on the network in
Switch Based Virtualization
Normal L2/L3 Processing Flow Table Production VLANs Research VLAN 1 Controller Research VLAN 2 Flow Table Controller 108FlowVisor
A network hypervisor developed by Stanford
A software proxy between the forwarding and
FlowVisor‐based Virtualization
OpenFlow Switch OpenFlow Protocol OpenFlow Protocol OpenFlow FlowVisor & Policy Control Craig’s Controller Heidi’s Controller Aaron’s Controller OpenFlow Switch OpenFlow Switch 110 Topology discovery is per slice OpenFlow Protocol OpenFlow ProtocolOutline
Outline
What is SDN? Limitations of current networks The idea of Network OS What is OpenFlow? How it helps SDN The current status & the future of SDN Conclusions 11 1OpenFlow Building Blocks
Controller NOX NOX Slicing Software FlowVisor FlowVisor FlowVisor Console 112 Applications LAVI LAVI ENVI (GUI)ENVI (GUI) n‐Castingn‐Casting ExpedientExpedient
NetFPGA NetFPGA Software Ref. Switch Software Ref. Switch Broadcom Ref. Switch Broadcom Ref. Switch OpenWRT OpenWRT PCEngine WiFi AP PCEngine WiFi AP Commercial Switches Stanford Provided OpenFlow Switches ONIX ONIX Stanford Provided Monitoring/ debugging tools oflops oflops oftrace
oftrace openseeropenseer
Open vSwitch Open vSwitch HP, NEC, Pronto, Juniper.. and many more HP, NEC, Pronto, Juniper.. and many more Beacon
Current status of SDN
Hardware support 113 Ciena Coredirector NEC IP8800 More coming soon... Juniper MX‐series HP Procurve 5400 Pronto 3240/3290 WiMax (NEC) PC Engines Netgear 7324Current status of SDN
Industry support
Google built hardware and software based on the
OpenFlow protocol
VMware purchased Nicira for $1.26 billion in 2012
IBM, HP, NEC, Cisco and Juniper also are offering
SDNs that may incorporate OpenFlow, but also have other elements that are specific to that vendor and their gear.