80
From product to SAAS Tech considerations Session 1 Friday 23 November 12

OpenSaas - From Product to Service - Part 1 - Intro & You run it

Embed Size (px)

DESCRIPTION

Debriefings session #1 on technical considerations when you move from 'product' to a service. Thank you Sirris - http://sirris.be

Citation preview

Page 1: OpenSaas - From Product to Service - Part 1 - Intro & You run it

From product to SAAS

Tech considerationsSession 1

Friday 23 November 12

Page 2: OpenSaas - From Product to Service - Part 1 - Intro & You run it

Blog: http://jedi.be/blog - Twitter : @patrickdebois - #devops

Technical ReviewerMonitoring Chapter Co-Author Veewee / Sahara / Mccloud

Organizer Since 2009 Europe Organizer 2010

Engineer

First Europe Training 2010

Libvirt - Fog

Speaker

Freelance consultant http://github.com/jedi4ever

Friday 23 November 12

Page 3: OpenSaas - From Product to Service - Part 1 - Intro & You run it

Introduction

Friday 23 November 12

Page 4: OpenSaas - From Product to Service - Part 1 - Intro & You run it

Your Product

Friday 23 November 12

Page 5: OpenSaas - From Product to Service - Part 1 - Intro & You run it

Your Work

Friday 23 November 12

Page 6: OpenSaas - From Product to Service - Part 1 - Intro & You run it

You ship it

Your Company Customers

Friday 23 November 12

Page 7: OpenSaas - From Product to Service - Part 1 - Intro & You run it

They buy it

Customer #1 Customer #2 Customer #N

Friday 23 November 12

Page 8: OpenSaas - From Product to Service - Part 1 - Intro & You run it

They install it ...

Customer Environment

hardware, servers, disks, ...

Friday 23 November 12

Page 9: OpenSaas - From Product to Service - Part 1 - Intro & You run it

They configure it ...

Customer Environment

database, ldap, dns, mail...

hardware, servers, disks, ...

Friday 23 November 12

Page 10: OpenSaas - From Product to Service - Part 1 - Intro & You run it

They test it ...

Customer Environment

database, ldap, dns, mail...

hardware, servers, disks, ...

BOOM

Friday 23 November 12

Page 11: OpenSaas - From Product to Service - Part 1 - Intro & You run it

They open the network

Customer Environment

database, ldap, dns, mail...

hardware, servers, disks, ...

internet, firewall, network

Friday 23 November 12

Page 12: OpenSaas - From Product to Service - Part 1 - Intro & You run it

They invite users

Customer Environment

greatfantastic

Friday 23 November 12

Page 13: OpenSaas - From Product to Service - Part 1 - Intro & You run it

They monitor (resource) usage

Customer Environment

greatfantasticfantasticfantasticfantasticfantasticfantasticfantasticfantastic

fantasticfantastic

Friday 23 November 12

Page 14: OpenSaas - From Product to Service - Part 1 - Intro & You run it

They handle Issues/Tickets

Customer Environment

greatfantasticfantasticfantasticfantasticfantasticfantasticfantasticfantastic

fantasticfantastic

Friday 23 November 12

Page 15: OpenSaas - From Product to Service - Part 1 - Intro & You run it

They troubleshoot

Customer Environment

greatfantasticfantasticfantasticfantasticfantasticfantasticfantasticfantastic

fantasticfantastic

Friday 23 November 12

Page 16: OpenSaas - From Product to Service - Part 1 - Intro & You run it

They fix problems

Customer Environment

greatfantasticfantasticfantasticfantasticfantasticfantasticfantasticfantastic

fantasticfantastic

Friday 23 November 12

Page 17: OpenSaas - From Product to Service - Part 1 - Intro & You run it

They complain to YOU

Customer Environment

greatfantasticfantasticfantasticfantasticfantasticfantasticfantasticfantastic

fantasticfantastic

Friday 23 November 12

Page 18: OpenSaas - From Product to Service - Part 1 - Intro & You run it

They performproduct upgrades

Customer Environment

greatfantasticfantasticfantasticfantasticfantasticfantasticfantasticfantastic

fantasticfantastic

Friday 23 November 12

Page 19: OpenSaas - From Product to Service - Part 1 - Intro & You run it

They Monitor Performance

Customer Environment

greatfantasticfantasticfantasticfantasticfantasticfantasticfantasticfantastic

fantasticfantastic

Friday 23 November 12

Page 20: OpenSaas - From Product to Service - Part 1 - Intro & You run it

They complain to YOU

Customer Environment

greatfantasticfantasticfantasticfantasticfantasticfantasticfantasticfantastic

fantasticfantastic

Friday 23 November 12

Page 21: OpenSaas - From Product to Service - Part 1 - Intro & You run it

They monitor security

Customer Environment

greatfantasticfantasticfantasticfantasticfantasticfantasticfantasticfantastic

fantasticfantastic

Friday 23 November 12

Page 22: OpenSaas - From Product to Service - Part 1 - Intro & You run it

They increase capacity

Customer Environment

greatfantasticfantasticfantasticfantasticfantasticfantasticfantasticfantastic

fantasticfantastic

Network

Disk

CPU

Friday 23 November 12

Page 23: OpenSaas - From Product to Service - Part 1 - Intro & You run it

They perform environment upgrades

Customer Environment

greatfantasticfantasticfantasticfantasticfantasticfantasticfantasticfantastic

fantasticfantastic

v1v2..

v1034

Friday 23 November 12

Page 24: OpenSaas - From Product to Service - Part 1 - Intro & You run it

They handle dependency upgrades

Customer Environment

greatfantasticfantasticfantasticfantasticfantasticfantasticfantasticfantastic

fantasticfantastic

v1v2..

v1034

Friday 23 November 12

Page 25: OpenSaas - From Product to Service - Part 1 - Intro & You run it

They test it

Customer Environment

greatfantasticfantasticfantasticfantasticfantasticfantasticfantasticfantastic

fantasticfantastic

Friday 23 November 12

Page 26: OpenSaas - From Product to Service - Part 1 - Intro & You run it

They complain to YOU

Customer Environment

greatfantasticfantasticfantasticfantasticfantasticfantasticfantasticfantastic

fantasticfantastic

Friday 23 November 12

Page 27: OpenSaas - From Product to Service - Part 1 - Intro & You run it

They fix problems

Customer Environment

greatfantasticfantasticfantasticfantasticfantasticfantasticfantasticfantastic

fantasticfantastic

Friday 23 November 12

Page 28: OpenSaas - From Product to Service - Part 1 - Intro & You run it

Your Product as a service

Product

+

Environment

Building Managing

Friday 23 November 12

Page 29: OpenSaas - From Product to Service - Part 1 - Intro & You run it

Their worries

Friday 23 November 12

Page 30: OpenSaas - From Product to Service - Part 1 - Intro & You run it

Their worriesbecome

YOUR worries

Friday 23 November 12

Page 31: OpenSaas - From Product to Service - Part 1 - Intro & You run it

Your worries

+ N x Their Worries

Friday 23 November 12

Page 32: OpenSaas - From Product to Service - Part 1 - Intro & You run it

By taking their worriesyou provide VALUE

Friday 23 November 12

Page 33: OpenSaas - From Product to Service - Part 1 - Intro & You run it

Now it’s your turn to delegate your worries

to other services

Friday 23 November 12

Page 34: OpenSaas - From Product to Service - Part 1 - Intro & You run it

3 x Sessions

1. Install and Run it (Cloud & Architecture)

2. Change it (Continuous Delivery)

3. Manage it (Monitoring, Metrics)

Friday 23 November 12

Page 35: OpenSaas - From Product to Service - Part 1 - Intro & You run it

Session 1:Install and Run it

Friday 23 November 12

Page 36: OpenSaas - From Product to Service - Part 1 - Intro & You run it

Your “Service”

HardwareOperating System, Loadbalancing, Storage

Application Server + Middleware

HAASIAASPAAS

SAAS

Friday 23 November 12

Page 37: OpenSaas - From Product to Service - Part 1 - Intro & You run it

Collocation & Dedicated Hosting

Your own little machinewith human intervention

Friday 23 November 12

Page 38: OpenSaas - From Product to Service - Part 1 - Intro & You run it

Hardware as a service

http://www.baremetalcloud.com/http://www.stormondemand.com/

http://www.hetzner.de/

Non-virtualized MachinesReal ‘raw hardware’

+ API

Friday 23 November 12

Page 39: OpenSaas - From Product to Service - Part 1 - Intro & You run it

Virtualization Types

Containers(share kernel)

Para-Virtualized

LXCOpenVZ

Solaris Zones

XenKVM

Vsphere

Hardware

Friday 23 November 12

Page 40: OpenSaas - From Product to Service - Part 1 - Intro & You run it

Infrastructure as a service

Virtualized Machine

+ APIJust Enough Operating System

Hardware

http://rackspace.com/http://aws.amazon.com/ec2

http://windowsazure.com

Friday 23 November 12

Page 41: OpenSaas - From Product to Service - Part 1 - Intro & You run it

Configuration Mgmt

Virtualized Machine

+ APIJust Enough Operating System

Hardware

Infrastructure as Code

Friday 23 November 12

Page 42: OpenSaas - From Product to Service - Part 1 - Intro & You run it

Configuration Mgmt

• Scripts vs Infrastructure As Code

• Re-usable installation procedures

• Documented

• Orchestration

• (more on this in Session2)

Friday 23 November 12

Page 43: OpenSaas - From Product to Service - Part 1 - Intro & You run it

Multi Tenancy

• Can you host multiple users on the same installation?

• Can you do it safely?

• Security/Performance, Separate Upgrades

• Application complexity

Friday 23 November 12

Page 44: OpenSaas - From Product to Service - Part 1 - Intro & You run it

Extra “infra” services

VM

+ API

JEOS

Hardware

Storage

VPN Firewall

MessageQueue

Mail DNS

Disk

“Compute” “Storage”Nosql

DB

Loadbalancer

“Connectivity”

Friday 23 November 12

Page 45: OpenSaas - From Product to Service - Part 1 - Intro & You run it

Platforms

Java Rails PHP NodeJS

Deploy + API

Specialized Platformsyou can’t see below

standard API

http://www.heroku.com/Friday 23 November 12

Page 46: OpenSaas - From Product to Service - Part 1 - Intro & You run it

Cloud = how much “They” vs “You”?

HardwareOperating System, Loadbalancing, Storage

Application Server + Middleware

HAASIAASPAAS

SAAS

Friday 23 November 12

Page 47: OpenSaas - From Product to Service - Part 1 - Intro & You run it

7/7 24h support

• API does not replace human interaction

• support contract in place?

• contact information?

Friday 23 November 12

Page 48: OpenSaas - From Product to Service - Part 1 - Intro & You run it

Build vs Buy/Rent

• Dedicated Instances

• Market Place for Spot instances

• Overcapacity vs buy upfront

Friday 23 November 12

Page 49: OpenSaas - From Product to Service - Part 1 - Intro & You run it

Billing, Reporting

• per hour

• per day

• per month

• dedicated , spot-instances, ...

Friday 23 November 12

Page 50: OpenSaas - From Product to Service - Part 1 - Intro & You run it

Private vs Public Cloud

• Use same technology & API internally

• Enterprise technology with self-servicing

• main difference is infinite scaling

Friday 23 November 12

Page 51: OpenSaas - From Product to Service - Part 1 - Intro & You run it

Beware!

Technology Lock-in ?Addiction to easyness

Live with the constraints of your provider ? What if they fail?

What’s under the hood?

Use abstraction libraries like boto, fog, jclouds

Friday 23 November 12

Page 52: OpenSaas - From Product to Service - Part 1 - Intro & You run it

Availability

Friday 23 November 12

Page 53: OpenSaas - From Product to Service - Part 1 - Intro & You run it

Single Point of Failure?

• Product

• People

• Process

• Understand and assess the probability, impact and prioritize

Friday 23 November 12

Page 54: OpenSaas - From Product to Service - Part 1 - Intro & You run it

Service Level Agreement

• Have customers agree a Service Level

• doesn’t have to be 99.999%

• downtime is permitted

• what if data gets lost? liability?

Friday 23 November 12

Page 55: OpenSaas - From Product to Service - Part 1 - Intro & You run it

Helpdesk/Tickets

• Where do you capture all the problems?

• Will you detect the problem before your customers?

• (more on this in Session 3)

Friday 23 November 12

Page 56: OpenSaas - From Product to Service - Part 1 - Intro & You run it

Collect Context

• Browser type, plugins, referrer

• IP Address used

• What user account

• Timestamp

• grab ‘current’ state of the problem

Friday 23 November 12

Page 57: OpenSaas - From Product to Service - Part 1 - Intro & You run it

Administrative Access

• Remote Console

• SSH Connection

• ‘backdoor’ access

Friday 23 November 12

Page 58: OpenSaas - From Product to Service - Part 1 - Intro & You run it

External Dependencies

• ANY Dependency

• cloud provider

• internet connection

• dns, email

• backup

• mobile phone

• other dataservices

Friday 23 November 12

Page 59: OpenSaas - From Product to Service - Part 1 - Intro & You run it

DNS & Mail Services

• customer . mydomain.com

• delay in updating and changes

Friday 23 November 12

Page 60: OpenSaas - From Product to Service - Part 1 - Intro & You run it

Reproducible

• Version Control, Archive

• upstream packages

• installed software

• licenses

• “Vendor the world”

Friday 23 November 12

Page 61: OpenSaas - From Product to Service - Part 1 - Intro & You run it

Loose Coupling

• Architectural design to limit impact

• of an error

• of a change

• avoid ‘big ball of mud’ / global restart

• Uncouple UI, API -> Application (KISS)

Friday 23 November 12

Page 62: OpenSaas - From Product to Service - Part 1 - Intro & You run it

Scalability & Performance

Friday 23 November 12

Page 63: OpenSaas - From Product to Service - Part 1 - Intro & You run it

horizontal vs vertical scaling

• Clustering

• Loadbalancing/Horizontal scaling

• Vertical Scaling (Bigger box)

• Sharding

Friday 23 November 12

Page 64: OpenSaas - From Product to Service - Part 1 - Intro & You run it

Resource Mgmt

• Limit Shared Disk I/O

• Network I/O

• CPU I/O

• Number of connections (DB,Web)

• <insert your expensive operation>

Friday 23 November 12

Page 65: OpenSaas - From Product to Service - Part 1 - Intro & You run it

Latency

• Network Latency (US, EU, ...)

• Where are your users

• DNS Latency

• HTTP Latency

• HTML Latency

Friday 23 November 12

Page 66: OpenSaas - From Product to Service - Part 1 - Intro & You run it

Loadbalancing& Indirection

• DNS Roundrobin

• Elastic IPS

• Reverse proxy balancing

• Cross geo Services DNS

• DNS TTL, Caching DNS

Friday 23 November 12

Page 67: OpenSaas - From Product to Service - Part 1 - Intro & You run it

Peak Loads/Scaling

• Scale UP

• Scale Down

• Autoscaling

• <Insert your bottleneck>

Friday 23 November 12

Page 68: OpenSaas - From Product to Service - Part 1 - Intro & You run it

Edge Services

• Content Delivery Network

• Caching Proxy

• Content closer to Users

• Offload your network

• Caching HTTP Headers (Cross Server)

Friday 23 November 12

Page 69: OpenSaas - From Product to Service - Part 1 - Intro & You run it

(Spare)Test capacity

Friday 23 November 12

Page 70: OpenSaas - From Product to Service - Part 1 - Intro & You run it

Security

Friday 23 November 12

Page 71: OpenSaas - From Product to Service - Part 1 - Intro & You run it

Users

• Identity Mgmt

• Oauth (Facebook, Twitter, Linkedin)

• Storing Password (Hash, Salted)

• Access Mgmt

• Role Management

• Email for registration/account

Friday 23 November 12

Page 72: OpenSaas - From Product to Service - Part 1 - Intro & You run it

Access Control

• Firewalling Incoming & Outgoing

• Firewalling Network & Host

• Layer 3(IP) , 4 (UDP), 7 (HTTP,SMTP...)

• Denial of Service

Friday 23 November 12

Page 73: OpenSaas - From Product to Service - Part 1 - Intro & You run it

Layers of Security

• Content Security (Antivirus, Escaping)

• Application Security (SQL injection etc..)

• Database Security

• OS (Minimal , Hardening, Least priviledge)

• Network Security (VLAN)

Friday 23 November 12

Page 74: OpenSaas - From Product to Service - Part 1 - Intro & You run it

Session Management

• Cookies

• Sticky Sessions

• Secure Cookies

• SSL, Encryption

• (across multiple hosts)

Friday 23 November 12

Page 75: OpenSaas - From Product to Service - Part 1 - Intro & You run it

Email Security

• Anti Spam

• Blackhole

• Antivirus

• Reputation Management

Friday 23 November 12

Page 76: OpenSaas - From Product to Service - Part 1 - Intro & You run it

Data Integrity

• DISK != BACKUP

• Corrupted Cloned data = Corrupted Data

• Consistent DB, Filesystem Backup

Friday 23 November 12

Page 77: OpenSaas - From Product to Service - Part 1 - Intro & You run it

The cloud doesn’t take your backups

• Persistent Storage

• Replication

• Delta Backup

• How long does it take to restore?

• Can you restore consistently?

• Do you have downtime for restoring?

• Individual account restore

Friday 23 November 12

Page 78: OpenSaas - From Product to Service - Part 1 - Intro & You run it

SSL & Remote Keys

• Password protected

• Where do you store your passwords?

• Sharing of credentials in team

• How fast can you change in case of breach?

Friday 23 November 12

Page 79: OpenSaas - From Product to Service - Part 1 - Intro & You run it

Next Sessions

1. Install and Run it (Cloud & Architecture)

2. Change it (Continuous Delivery)

3. Manage it (Monitoring, Metrics)

Friday 23 November 12

Page 80: OpenSaas - From Product to Service - Part 1 - Intro & You run it

How about your setup?

Friday 23 November 12