Deployment. Chris Wilson, AfNOG / 26

Similar documents
Scalability of web applications

Large-Scale Web Applications

Real Life Web Development. Joseph Paul Cohen

Document Sub Title. Yotpo. Technical Overview 07/18/ Yotpo

ZENworks Mobile Workspace High Availability Environments. September 2017

Cloud Services. Introduction

MySQL Multi-Site/Multi-Master Done Right

Linux Administration

Real World Web Scalability. Ask Bjørn Hansen Develooper LLC

Help! I need more servers! What do I do?

What to Know About Exchange 2013 and Load Balancing

ARCHITECTING WEB APPLICATIONS FOR THE CLOUD: DESIGN PRINCIPLES AND PRACTICAL GUIDANCE FOR AWS

Building a Scalable Architecture for Web Apps - Part I (Lessons Directi)

How to setup Orchestrator to manage thousands of MySQL servers. Simon J Mudd 3 rd October 2017

Polarion Enterprise Setup 17.2

Offloaded Data Transfers (ODX) Virtual Fibre Channel for Hyper-V. Application storage support through SMB 3.0. Storage Spaces

Going Serverless. Building Production Applications Without Managing Infrastructure

Principal Solutions Architect. Architecting in the Cloud

High Availability High Performance Plone

What is the Future of PostgreSQL?

IceWarp to IceWarp Migration Guide

Cloud Computing /AWS Course Content

Large Scale MySQL Migration

Exam : Implementing Microsoft Azure Infrastructure Solutions

Developing Microsoft Azure Solutions (70-532) Syllabus

Delivering Microservices Securely and at Scale with NGINX in Red Hat OpenShift. November, 2017

vcenter Server Installation and Setup Update 1 Modified on 30 OCT 2018 VMware vsphere 6.7 vcenter Server 6.7

Distributed Data Infrastructures, Fall 2017, Chapter 2. Jussi Kangasharju

Using PostgreSQL in Tantan - From 0 to 350bn rows in 2 years

High Availability for Enterprise Clouds: Oracle Solaris Cluster and OpenStack

CISC 7610 Lecture 5 Distributed multimedia databases. Topics: Scaling up vs out Replication Partitioning CAP Theorem NoSQL NewSQL

HowTo DR. Josh Berkus PostgreSQL Experts SCALE 2014

Hosting with Eduphoria

Polarion 18 Enterprise Setup

Designing Database Solutions for Microsoft SQL Server (465)

SQL Azure. Abhay Parekh Microsoft Corporation

Microsoft Exchange Server 2013 and 2016 Deployment

Scaling DreamFactory

Ivanti Service Desk and Asset Manager Technical Specifications and Architecture Guidelines

Installation and Upgrade Guide

MongoDB and Mysql: Which one is a better fit for me? Room 204-2:20PM-3:10PM

MySQL HA Solutions Selecting the best approach to protect access to your data

Virtualization And High Availability. Howard Chow Microsoft MVP

Send me up to 5 good questions in your opinion, I ll use top ones Via direct message at slack. Can be a group effort. Try to add some explanation.

<Insert Picture Here> MySQL Web Reference Architectures Building Massively Scalable Web Infrastructure

Become a MongoDB Replica Set Expert in Under 5 Minutes:

Acronis and Acronis Secure Zone are registered trademarks of Acronis International GmbH.

Data Centers. Tom Anderson

Introduction. The Safe-T Solution

Microsoft Windows Embedded Server Overview

vcenter Server Installation and Setup Modified on 11 MAY 2018 VMware vsphere 6.7 vcenter Server 6.7

HA for OpenStack: Connecting the dots

Authentication for Web Services. Ray Miller Systems Development and Support Computing Services, University of Oxford

Scaling Without Sharding. Baron Schwartz Percona Inc Surge 2010

Scaling. Yashh Nelapati Gotham City. Marty Weiner Krypton. Friday, July 27, 12

Virtual Machine Migration

High Noon at AWS. ~ Amazon MySQL RDS versus Tungsten Clustering running MySQL on AWS EC2

TomcatCon London 2017 Clustering Mark Thomas

TANDBERG Management Suite - Redundancy Configuration and Overview

HA solution with PXC-5.7 with ProxySQL. Ramesh Sivaraman Krunal Bauskar

Back-end architecture

Developing Microsoft Azure Solutions (70-532) Syllabus

Use Case: Scalable applications

Persistence & State. SWE 432, Fall 2016 Design and Implementation of Software for the Web

MariaDB MaxScale 2.0, basis for a Two-speed IT architecture

NTP Software VFM Administration Web Site

MySQL High Availability. Michael Messina Senior Managing Consultant, Rolta-AdvizeX /

Polarion 18.2 Enterprise Setup

Distributed Systems. 27. Engineering Distributed Systems. Paul Krzyzanowski. Rutgers University. Fall 2018

Architecting Microsoft Azure Solutions (proposed exam 535)

NTP Software VFM. Administration Web Site for EMC Atmos User Manual. Version 6.1

Multi-Tenant SQL. Presented by Eddy Kleinjan. How to handle multi-tenancy in applications. Are you ready to take your application to the next level?

Using MySQL for Distributed Database Architectures

VMware Identity Manager Connector Installation and Configuration (Legacy Mode)

EXAM Windows Server Administration Fundamentals. Buy Full Product.

Build planetary scale applications with compartmentalization

Disaster Recovery and Business Continuity

Load Balancing Sage X3 ERP. Deployment Guide v Copyright Loadbalancer.org, Inc

Avoka Transact Reference Architectures. Version 4.0

Open-Xchange Server in Distributed Environments

Deploy. A step-by-step guide to successfully deploying your new app with the FileMaker Platform

vsphere Installation and Setup Update 2 Modified on 10 JULY 2018 VMware vsphere 6.5 VMware ESXi 6.5 vcenter Server 6.5

Load Balancing/Clustering

Where s Your Third Copy?

Benefits of an Exclusive Multimaster Deployment of Oracle Directory Server Enterprise Edition

BIG-IP DNS: Monitors Reference. Version 12.1

Unlimited Scalability in the Cloud A Case Study of Migration to Amazon DynamoDB

Echidna Concepts Guide

SafeConsole On-Prem Install Guide

Scale and secure workloads, cost-effectively build a private cloud, and securely connect to cloud services. Beyond virtualization

Migrating and living on RDS/Aurora. life after Datacenters

Pivotal Greenplum Database Azure Marketplace v4.0 Release Notes

Amazon Web Services (AWS) Solutions Architect Intermediate Level Course Content

Distributed Architectures & Microservices. CS 475, Spring 2018 Concurrent & Distributed Systems

Techno Expert Solutions

SQL Server on Linux and Containers

MySQL Performance Improvements

CONFIGURING SQL SERVER 2008 REPORTING SERVICES FOR REDHORSE CRM

How Microsoft Built MySQL, PostgreSQL and MariaDB for the Cloud. Santa Clara, California April 23th 25th, 2018

Course 20533B: Implementing Microsoft Azure Infrastructure Solutions

Transcription:

Deployment Chris Wilson, AfNOG 2016 1 / 26

About this presentation Based on previous talks by Joel Jaeggli, Evelyn Namara and NSRC, with thanks! You can access this presentation at: Online: http://afnog.github.io/sse/apache/ Local: http://www.ws.afnog.org/afnog2016/sse/apache/index.html Github: https://github.com/afnog/sse/blob/master/apache/presentation.md Download PDF: http://www.ws.afnog.org/afnog2016/sse/apache/presentation.pdf Acknowledgements: Cover photo by MarianZubak at en.wikipedia, CC BY 2.5 2 / 26

What is Deployment Now you have this pretty shiny new thing! E.g. a web service, mail service, storage service How do we make it: Reliable Scalable Secure Efficient (cheap) Fast For heavy load (thousands of users?) 3 / 26

What is Deployment Wrong time to ask! Needs to have been designed for all this (architecture) Better hope the designers thought of it! 4 / 26

Design for Deployment So how do we design something: Reliable Scalable Secure Efficient (cheap) Fast 5 / 26

Design for Deployment Two ways: scale UP (bigger boxes) or scale OUT. Scale UP is appropriate when: size is limited (e.g. internal service for <1000 users) and reliability is not critical (<99% uptime) so you can restore from backups Otherwise you must scale OUT 6 / 26

Scaling UP Scaling UP is boring: More expensive boxes and disks RAID arrays Large backups Slow restores Hard to move More complicated when service is layered (e.g. web app + database) Ultimately limited by how much (data/cpu) you can fit in 1-2 instances 7 / 26

Scaling OUT Build it out of smaller things (microservices) which are: Reliable Secure Small (cheap) Efficient (cheap) Fast And connect them using an architecture which also is. Note: the small things do not have to be scalable if your architecture scales! 8 / 26

Organisation What else is a large system organised out of smaller components? 9 / 26

Organisation What else is a large system organised out of smaller components? WE ARE! Note the hierarchical structure of complex organisms (see right) 10 / 26

Characteristics of Life RED GIRL: Respiration (energy use) Excretion (energy use) Death (plan for unit loss) Growth (possible but better avoided) Irritability (responds to events, I/O) Reproduction (create from saved image) Locomotion (migration) 11 / 26

Microservices Need to be/should be easy to: Maintain Monitor Manage Move 12 / 26

Microservices Examples of microservices (microservers): File server Database server RADIUS server LDAP server HTTP reverse proxy/load balancer/ssl wrapper Static content HTTP server PHP/Python/Node.js server SMTP server IMAP server/load balancer DNS server So how do we make these things? 13 / 26

Microservice outsourcing Most of these you can buy as a service online: File server: not exactly, but Amazon S3/OpenStack Swift Database server: Amazon RDS, OpenStack Trove Authentication service: Amazon Directory Service (hosted AD), OpenID HTTP reverse proxy/load balancer/ssl wrapper: CloudFront Static content HTTP server: CDN (CloudFront etc) PHP server: most web hosts Ruby/Python/Node.js server: Engine Yard, Heroku SMTP server: MailChimp, Mandrill, SendGrid IMAP server/load balancer: not really DNS server: Dyn, Amazon Route 53, most web hosts But if you want to build your own, read on... 14 / 26

Microserver template Application/daemon Reliable Secure Small (cheap) Efficient (cheap) Which application/daemon do we run, and how do we use it to achieve each of these requirements? 15 / 26

File microserver Application/daemon: SMB server (Samba) or NFS or cluster FS Reliable -> replicated to another unit (DRBD or cluster FS) Secure: Against all kinds of unauthorised access? Network encryption Authenticate against RADIUS/LDAP/Kerberos Small (cheap) -> 20-100GB size? Forces us to break up our large storage requirements Efficient (cheap): SMB and NFS are both lightweight Network and disk encryption are costs - do we need them? 16 / 26

SQL database microserver Application/daemon: MySQL or PostgreSQL Reliable -> database replication Secure: Built-in authentication and authorisation No external authentication? Small (cheap) -> 20GB size? Forces us to break up our large database requirements (AKA sharding) Design for isolation where possible, e.g. one DB per customer Per-customer DBs are too small, so combine multiple DBs per server with migration plan Efficient (cheap): SQL database servers are heavyweight! Only master servers are writable! Queries are expensive, so run them on read-only slaves 17 / 26

HTTP microserver Application/daemon: Nginx Reliable -> stateless Secure: Nginx is small (but had many vulnerabilities) Small (cheap) -> Nginx is lightweight Efficient (cheap) -> Nginx is lightweight 18 / 26

Routing How to connect up these services: How do people access them (front end) How do they locate/find each other? How does webserver B know which database/imap server to use for this customer? 19 / 26

Routing This is how we actually build a service out of simple components (architecture): Applies at every level: front end->web server, web server->database/imap, IMAP->file server DNS, load balancer or application logic What happens if the user's host instance is down? Need an automated fault detection and failover system! Probably need to engineer this yourself Ignore the problem and hard-code it like we always did before 20 / 26

Routing DNS Use the DNS to send clients (users or applications) to an instance: Direct: john.provider.com Just add A records to DNS Beware: DNS cannot be changed instantly (failover is slow) Indirect: login first and redirect to instance Requires server-side application logic/support Potential many-to-one: john.provider.com and steve.provider.com -> same web/db server Can be changed transparently to user and without downtime Note: migration (planned) is easy, failover (unplanned) is hard 21 / 26

Routing DNS Load balancer Place a load balancer in front of servers, and direct clients to it. Advantages: Transparent to users Instant failover (unlike DNS) You may need a reverse proxy anyway (for SSL, static content routing) Typically good routing flexibility (reason for existence!) Disadvantages: Single point of failure Can interfere with application HTTP Host header, cookie, redirect rewriting Application state: need stateful routing? Another layer adds complexity and latency 22 / 26

Routing DNS Load balancer Application logic Application designed (or modified) to choose which backend to use based on an algorithm. Lookup which database to use... in the database? Doesn't work for the user frontend! Could be based on username: john -> server j.sql.provider.com steve -> server s.sql.provider.com Or first 2 letters, etc. Using DNS for indirection makes migration easier In some cases, only app logic is needed, e.g. store files in Amazon S3 and let Amazon handle load balancing and HA. 23 / 26

Routing, Monitoring and Failover Nagios monitors your web/db/imap backend servers Failure detected -> run event handler (Nagios feature) Handler initiates failover: Change the DNS Reconfigure load balancers Rewrite application config files and restart Update database -> web application responds Start a VRRP IP failover/takeover New master may need reconfiguration (e.g. read-only slave -> read-write master DB) Assume fail-hard: consistency check may be required 24 / 26

Routing, Monitoring and Failover Recovery handling Recovery detected -> run a different event handler What should it do? Fail back immediately? Reconfigure recovered instance as a slave? Recovery is often harder than failover! 25 / 26

FIN Any questions? (yeah, right!) 26 / 26