Unibet.com Architecture



Similar documents
Accelerating Wordpress for Pagerank and Profit

E-commerce is also about

Integrating Web Messaging into the Enterprise Middleware Layer

FIVE SIGNS YOU NEED HTML5 WEBSOCKETS

Scalability of web applications. CSCI 470: Web Science Keith Vertanen

Performance Management for Cloudbased STC 2012

Why Web Performance Matters Open Text Web Solutions Usergroup Anwendertagung Feb Tobias Dreyschultze Tobel Online Web Consultancy

FIVE WAYS TO OPTIMIZE MOBILE WEBSITE PERFORMANCE WITH PAGE SPEED

MEASURING WORKLOAD PERFORMANCE IS THE INFRASTRUCTURE A PROBLEM?

making drupal run fast

Software Performance, Scalability, and Availability Specifications V 3.0

Chapter 2 TOPOLOGY SELECTION. SYS-ED/ Computer Education Techniques, Inc.

Performance Optimization For Operational Risk Management Application On Azure Platform

Performance testing Web 2.0

Measuring CDN Performance. Hooman Beheshti, VP Technology

<Insert Picture Here> Getting Coherence: Introduction to Data Grids South Florida User Group

Distributed Systems. 25. Content Delivery Networks (CDN) 2014 Paul Krzyzanowski. Rutgers University. Fall 2014

Migration Scenario: Migrating Backend Processing Pipeline to the AWS Cloud

How To Understand The Power Of A Content Delivery Network (Cdn)

In Memory Accelerator for MongoDB

Reference Model for Cloud Applications CONSIDERATIONS FOR SW VENDORS BUILDING A SAAS SOLUTION

Social Networks and the Richness of Data

Liferay Performance Tuning

Web Performance. Sergey Chernyshev. March '09 New York Web Standards Meetup. New York, NY. March 19 th, 2009

From Internet Data Centers to Data Centers in the Cloud

Distributed Systems. 23. Content Delivery Networks (CDN) Paul Krzyzanowski. Rutgers University. Fall 2015

Informatica Master Data Management Multi Domain Hub API: Performance and Scalability Diagnostics Checklist

Test Run Analysis Interpretation (AI) Made Easy with OpenLoad


Agenda. Enterprise Application Performance Factors. Current form of Enterprise Applications. Factors to Application Performance.

Enterprise Edition Scalability. ecommerce Framework Built to Scale Reading Time: 10 minutes

Web Performance. Lab. Bases de Dados e Aplicações Web MIEIC, FEUP 2014/15. Sérgio Nunes

Front-End Performance Testing and Optimization

LARGE SCALE INTERNET SERVICES

Oracle Communications WebRTC Session Controller: Basic Admin. Student Guide

KEMP LoadMaster. Enabling Hybrid Cloud Solutions in Microsoft Azure

INDIA September 2011 virtual techdays

Wikimedia Architecture Doing More With Less. Asher Feldman Ryan Lane Wikimedia Foundation Inc.

Drupal Performance Tuning

Doug Goldberg. Vice President of Magento Solutions, ZeroLag

Website Performance: Kyle Simpson

An Oracle White Paper July Oracle Primavera Contract Management, Business Intelligence Publisher Edition-Sizing Guide

Tier Architectures. Kathleen Durant CS 3200

Sports betting solutions

Web Application Deployment in the Cloud Using Amazon Web Services From Infancy to Maturity

Adobe LiveCycle Data Services 3 Performance Brief

MySQL Enterprise Monitor

Web Application Hosting Cloud Architecture

Testing & Assuring Mobile End User Experience Before Production. Neotys

Fax Server Cluster Configuration

Cloud Based Application Architectures using Smart Computing

Developing Scalable Java Applications with Cacheonix

MySQL és Hadoop mint Big Data platform (SQL + NoSQL = MySQL Cluster?!)

Scalable Architecture on Amazon AWS Cloud

Planning Domain Controller Capacity

TRUE PERFORMANCE ENGINEERING

Chapter 4. Learning Objectives. Learning Objectives. Building an E-commerce Web Site. Building an E-commerce Web Site: A Systematic Approach

Electronic Commerce Engineering

Learning Management Redefined. Acadox Infrastructure & Architecture

Repeater. BrowserStack Local. browserstack.com 1. BrowserStack Local makes a REST call using the user s access key to browserstack.

Scaling Progress OpenEdge Appservers. Syed Irfan Pasha Principal QA Engineer Progress Software

Next Generation Open Source Messaging with Apache Apollo

GridGain In- Memory Data Fabric: UlCmate Speed and Scale for TransacCons and AnalyCcs

Cisco Wide Area Application Services Optimizes Application Delivery from the Cloud

Oracle Primavera P6 Enterprise Project Portfolio Management Performance and Sizing Guide. An Oracle White Paper October 2010

Amazon Elastic Beanstalk

Maintaining Non-Stop Services with Multi Layer Monitoring


References. Introduction to Database Systems CSE 444. Motivation. Basic Features. Outline: Database in the Cloud. Outline

Introduction to Database Systems CSE 444

Contents Introduction... 5 Deployment Considerations... 9 Deployment Architectures... 11

Cloud Computing. Cloud computing:

Fault-Tolerant Computer System Design ECE 695/CS 590. Putting it All Together

LinuxWorld Conference & Expo Server Farms and XML Web Services

Assignment # 1 (Cloud Computing Security)

Performance Tuning for Oracle WebCenter Content 11g: Strategies & Tactics CHRIS ROTHWELL & PAUL HEUPEL FISHBOWL SOLUTIONS, INC.

How To Optimize Your Website With Radware Fastview

Global Server Load Balancing

ECM Chapter 4 Building an E-commerce Presence: Web Sites, Mobile Sites, and Apps

Preparing Your IT for the Holidays. A quick start guide to take your e-commerce to the Cloud

XTM Web 2.0 Enterprise Architecture Hardware Implementation Guidelines. A.Zydroń 18 April Page 1 of 12

Amazon Web Services Yu Xiao

How To Connect To Bloomerg.Com With A Network Card From A Powerline To A Powerpoint Terminal On A Microsoft Powerbook (Powerline) On A Blackberry Or Ipnet (Powerbook) On An Ipnet Box On

Why Mobile Performance is Hard

Running SAP Solutions in the Cloud How to Handle Sizing and Performance Challenges. William Adams SAP AG

The Application Front End Understanding Next-Generation Load Balancing Appliances

Responsive, resilient, elastic and message driven system

Deploying Adobe Experience Manager DAM: Architecture blueprints and best practices

How To Understand The Architecture Of An Ulteo Virtual Desktop Server Farm

Enabling Database-as-a-Service (DBaaS) within Enterprises or Cloud Offerings

Cisco Videoscape Distribution Suite Service Broker

Techniques for Scaling Components of Web Application

Transcription:

Unibet.com Architecture Open Source at Unibet.com: 10x scalability at half the cost stefan.norberg@unibet.com @stnor

About the speaker

Unibet Open Source strategy

Open source software and open standards should always be our first choice Avoid vendor lock-in - software we use should have a right-to-use license without any cost attached

Commercial, proprietary software need to show exceptional business value (over Free solutions) in order to be considered Contribute to the community by buying support from companies backing FOSS solutions or paying for product improvements

Customers Partners & Affiliates Banners Browser Flash/Flex Content Deliver Networks Fan-out Push Servers DDos Protection Single-sign-on Payment Web CMS REST API:s Poker Casino Bingo Async Betting API Messaging Customer System Wallet System Bonus System Betting Engine

Customers Partners & Affiliates Banners Browser Flash/Flex Content Deliver Networks Fan-out Push Servers DDos Protection Single-sign-on Payment Web CMS REST API:s Async Betting API Messaging Customer System Wallet System Bonus System Betting Engine

Unibet in numbers 100% online - www.unibet.com 30+ web sites in 27 languages Gross win: 250 million dollars / year Technical growth is >100% / year

Why is this hard?

Because users are growing impatient

2006: 4 seconds Source: Juniper Research

2009: 2 seconds Source: Forrester Research

Two main challenges Latency - data too far away from where it s needed Bottlenecks - resource contention

Avg 40 ms RTT

Meet Kevin Kevin is a customer to the candy store Kevin wants to buy 40 pcs for his allowance Kevin has extremely small pockets (they only fit one piece of candy) He also wants to buy two chocolate bars and one bubble gum The candy store is far far away from Kevin s house

Idea #1 Sell bags of candy (Caveat: no bars or bubblegums in bags!)

The bag is a big JS file

The bag is a big CSS file

The bag is a CSS image sprite*

/4.9.3/images/uskin1/uspritesheadertabs.png blacktab

The 100% optimized e-commerce web page: 4 requests Conn 1 250 ms 30 ms HTML CSS Conn 2 250 ms JS 30 ms IMG Total time: 530 ms

Some real world data amazon.com: 57 requests (6) ebay.com: 41 requests (4) unibet.com: 41 requests (1)

Ouch.

Idea #2 Sell bags on street corners (Caveat: no bars or bubblegums in bags!)

There are many street corners

Street corners are very near all customers

The street corner is a Content Delivery Network node

35 ms avg latency GOOD SPOT

70 ms avg latency BAD SPOT

BAD SPOT Bandwidth Latency Redundancy Pricing

Tune tune tune the front-end! 80-90% of the end-user response time is spent downloading and processing all the components in the page Rewrote and optimized all our front-end code (XHTML, CSS, JS) Implemented image spriting and fixed other issues with cache headers etc

Tune tune tune the front-end! Use best practice to optimize your frontend (YSlow, Page Speed etc) Progressive rendering is key Improve performance by having objects served close to the user

http://www.webpagetest.org/

How we do it Follow YSlow and Pagespeed guidelines Be close to your users - use a Content Delivery Network (CDN) Prepend CDN proxy name to all static files: /foo/bar -> http://cdn.com/foo/bar Set a one year cache-time (no 304:s) Version your static content Stripe objects over several CNAMES

15 ms avg latency 10 ms avg latency 10 ms avg latency NOT SO BAD SPOT

By using a CDN we serve our users quickly from anywhere in the world Capacity is not an issue We have cut our delivery costs to 25% Use several CDN vendors for load balancing / redundancy

Next steps...

Live Betting data distribution Bet while the game is on Who gets the next corner, who scores the next goal etc 10000:s of real-time clients need price updates almost every second 20 concurrent games 10+ offers within one game Product growth 60-80% per year

Betting Engine

Fan-out Server Fan-out Server Betting Engine

Kaazing Rabbit MQ Kaazing Rabbit MQ End-to-end messaging RabbitMQ RabbitMQ Betting Engine Kaazing Enterprise Gateway Google Protocol Buffers

RabbitMQ Free Open Source and Open Standards protocol (AMQP) Highly available, highly scalable (Erlang/OTP) Excellent & friendly support available

Kaazing Open Source and Open Standards protocol (HTML5 WebSockets) Supported AMQP clients for Flex, browers Connection offloading Great at overcoming last mile hurdles (firewalls, proxies, browsers) Excellent & friendly support available

Protocol Buffers Flexible, efficient, automated mechanism for serializing (binary) Schema support (.proto files) Language neutral (we use Java to Actionscript) Invented and used by Google Open Sourced in July 2008

Java/ Spring Betting Engine RabbitMQ RabbitMQ Kaazing Fan-out node AS3 Live Betting Client Protobufs/AMQP

Let s get back to the Candy store...

Datacenter Ok, the candy delivery problem is solved! However, we cannot serve the customers chocolate and bubble gum quickly enough Queues are building up due to our bottlenecks

The chocolate bar is a cacheable read

The bubble gum is a non-cacheable read or a write

The candy store checkout is an app server

The bubble gum machine is a database system

Example #1 More hardware! (and sw licenses)

Kids are invading our store...

Food for thought paying per core is paying for peaks......is not acceptable?

You cannot buy a product to solve this problem

Need to rearchitect!

Example #2 Near-cache

Terracotta Network Attached Memory Extends the Java threading model across JVM:s In-memory speed access to data Fully coherent, with stored to disk guarantees Writes are sent as deltas across nodes

Keep data stored/cached where it s needed for processing JVM Heap Betting Engine Betting Engine... Betting Engine L1 SoR Event Repository Bet Offer Repository Live Bets Terracotta L2 Eventually consistent Reporting/ Legacy write-behind Oracle (MySQL)

Keep data stored/cached where it s needed for processing JVM Heap Betting Engine Betting Engine... Betting Engine L1 update SoR Event Repository Bet Offer Repository Live Bets Terracotta L2 write-behind Reporting/ Legacy Oracle (MySQL)

Terracotta L2 server can become bottleneck Shard (free) or stripe ($$$)

Example #3 Offload reads to separate systems

Betting Engine Betting Engine... Betting Engine History Server... History Server Event Repository Bet Offer Repository Live Bets R R R Bet History Terracotta L2 Oracle (MySQL) Settle Bet MySQL Backoffice

Example #4 Affinity + multi master replication

cus-client.jar cus-client.jar user1 user2 user3 user4 Customer System Customer System Customer System Customer System LDAP LDAP LDAP LDAP data center 1 data center 2

Example #5 Partition the data to scale writes

C C C Need to get settlements done quickly More than 10000 writes / s History Server... History Server Scale out by using multiple MySQL instances Live Bets Bet History routing S1 S2 S3 MySQL

Combining the pieces

Browser Betting Client Flash Betting Client HTML Geo-distributed Fan-out Push Servers (Kaazing) History API Settled bets 100% read Betting API Live data commands price updates and replies Betting History sharded with local MySQL write-behind on settlement Betting Engine Betting Engine Betting Engine Shared memory for events, bet offers and customer bets (Terracotta) payouts AMQP Broker (RabbitMQ) write-behind Account Servers Database (MySQL)

Recap: Two main challenges Latency - data too far away from where it s needed Bottlenecks - resource contention

Recipes used at Unibet information delivery Optimize your web apps! Get rid of static object traffic Move web data closer to customers (CDN) Last-mile fan-out messaging

Recipes used at Unibet in the data center Move data to business logic Read-only farms Multi-master replication for read-mostly data Sharding to scale writes

Open Source Software and Services is used by Unibet extensively in mission critical applications because...

...we are convinced it s better and more cost effective!

Thanks! (we re hiring) @stnor stefan.norberg@unibet.com stnor.wordpress.com www.linkedin.com/in/stnor

Backup slides

DDoS resilience Outsourced DNS DDoS protection service

Unibet is here Unibet is here Unibet is here GRE tunnels