virtualizing asterisk - presented at digium asterisk world, feb 2008, miami, florida

28

Upload: nirsimionovich

Post on 13-Nov-2014

3.477 views

Category:

Documents


2 download

DESCRIPTION

Asterisk is considered a highly intensive I/O application, usually not associated with VM based environments. The presentation will explore the various possibilities of utilizing Asterisk within a VM based environment, how it can be utilized and also various tests that had been conducted with popular Asterisk Open Source packages and an implementation of a high-speed dialer framework - capable ...

TRANSCRIPT

Page 1: Virtualizing Asterisk - Presented at Digium Asterisk World, Feb 2008, Miami, Florida
Page 2: Virtualizing Asterisk - Presented at Digium Asterisk World, Feb 2008, Miami, Florida

Virtualizing AsteriskVirtualizing Asterisk

Despairing Myths and LegendsNir Simionovich, Asterisk Guru

Greenfield Technologies Ltd.

Page 3: Virtualizing Asterisk - Presented at Digium Asterisk World, Feb 2008, Miami, Florida

A bit about myself�

• Founder of Greenfield Technologies Ltd

• Founder of the Israeli Asterisk Users • Founder of the Israeli Asterisk Users

group

• Started using Asterisk in 2002

• Author of the AsteriskNOW book from

Packt Publishing (Mar 08)Packt Publishing (Mar 08)

• Author of the Asterisk Developer’s Guide

book from Packt Publishing (Jan 09)

Page 4: Virtualizing Asterisk - Presented at Digium Asterisk World, Feb 2008, Miami, Florida

Asterisk – A SysAdmin’s POV

• When most SysAdmins look at Asterisk,

this is what they see:this is what they see:

Page 5: Virtualizing Asterisk - Presented at Digium Asterisk World, Feb 2008, Miami, Florida

Myth I: * is a resource hog

• Asterisk requires a fair amount of

resources in order to run properly.resources in order to run properly.

• The things that turn Asterisk into a

resource hog are the applications

associated with it (AGI, AMI and others).

• Call center applications usually consume • Call center applications usually consume

much resources.

Page 6: Virtualizing Asterisk - Presented at Digium Asterisk World, Feb 2008, Miami, Florida

Myth II: * is a slow dialer

• Traditional Asterisk based dialers utilize

the AMI interface for generating outbound the AMI interface for generating outbound

calls, in its most simplistic form.

• While AMI had progressed over the

years, traditional implementations are in

capable is surpassing the 10 calls per capable is surpassing the 10 calls per

second limitation.

• Companies build large infrastructures to

sustain their needs

Page 7: Virtualizing Asterisk - Presented at Digium Asterisk World, Feb 2008, Miami, Florida

Myth III: * Can’t run in a VM

• Myth III is a result of Myth I and Myth II

together.together.

• After all, if Asterisk is a hog, and,

• Asterisk is a slow dialer, thus,

• Running Asterisk in a VM based

environments is either complicated or environments is either complicated or

impossible.

Page 8: Virtualizing Asterisk - Presented at Digium Asterisk World, Feb 2008, Miami, Florida
Page 9: Virtualizing Asterisk - Presented at Digium Asterisk World, Feb 2008, Miami, Florida

Introducing PokeTalk.Com

Page 10: Virtualizing Asterisk - Presented at Digium Asterisk World, Feb 2008, Miami, Florida

Why is PokeTalk interesting?

• PokeTalk.Com is an ad driven, web

callback system based upon Asterisk.callback system based upon Asterisk.

• While it utilizes an Asterisk based dialer,

its platform is completely virtualized –

utilizing VMWARE Server.

• It currently operates 4 different Virtual • It currently operates 4 different Virtual

Asterisk servers, capable of sustaining

up to 100 dials per second and up to 800

concurrent channels.

Page 11: Virtualizing Asterisk - Presented at Digium Asterisk World, Feb 2008, Miami, Florida
Page 12: Virtualizing Asterisk - Presented at Digium Asterisk World, Feb 2008, Miami, Florida

How does it work?

Page 13: Virtualizing Asterisk - Presented at Digium Asterisk World, Feb 2008, Miami, Florida

The Architecture

Web ServerWeb Server

VMWARE

Server

VMWARE

Server

MySQL

Database

Cluster

Firewall

Asterisk Dialer

Asterisk Dialer

Web Server

Web Server

Asterisk Dialer

Asterisk Dialer

Web Server

Web Server

Firewall

ISP Web

LBS

Page 14: Virtualizing Asterisk - Presented at Digium Asterisk World, Feb 2008, Miami, Florida

Hardware Specification

• Each VMWARE server is based upon the

following hardware:following hardware:

– Intel Dual Quad Core XEON Processors

– 2 x RAID-1 SATA Drives (500GB)

– 2 x Gigabit Ethernet

– 16GB RAM– 16GB RAM

• In a VM environment, the more RAM you

have the better – even if you don’t use all

of it.

Page 15: Virtualizing Asterisk - Presented at Digium Asterisk World, Feb 2008, Miami, Florida

Guest Operating System Setup

• CentOS 5.2 64bit Release

• All services turned off• All services turned off

• Active services include SSH and xinetd

• VMWARE Server 1.0.4

• Each Virtual server is setup as:

– Dual Core CPU

– 2GB RAM

– 40GB Hard Drive (static allocation)

Page 16: Virtualizing Asterisk - Presented at Digium Asterisk World, Feb 2008, Miami, Florida

Dialer Operating System

• CentOS 5.2 32Bit Release

• Asterisk 1.4.22• Asterisk 1.4.22

• MySQL 5

• PHP 5.2

• lighttpd web server

• FreePBX Management Interface

• Dialer is implemented in PHP and C++!

Page 17: Virtualizing Asterisk - Presented at Digium Asterisk World, Feb 2008, Miami, Florida

The Dialer Application SetupSIP Termination Partners

Frontend Web

DialerHandler

Quaue Manager

XML-RPCXML-RPC Status

Reports

Page 18: Virtualizing Asterisk - Presented at Digium Asterisk World, Feb 2008, Miami, Florida

A few service facts (Jan 09)

• Number of registered users > 90,000

• Max number of concurrent calls across • Max number of concurrent calls across

the cluster: 360 calls

• Max number of concurrent requests

served: 110 concurrent requests

• Total number of minutes served monthly • Total number of minutes served monthly

> 2M minutes per month.

Page 19: Virtualizing Asterisk - Presented at Digium Asterisk World, Feb 2008, Miami, Florida
Page 20: Virtualizing Asterisk - Presented at Digium Asterisk World, Feb 2008, Miami, Florida

Why virtualize Asterisk?

• Enable better utilization of your hardware

moneymoney

• Consolidate your services into single

hardware infrastucture

• Utilizing Open/Free virtualization

technologies will lower your overall TCOtechnologies will lower your overall TCO

• Virtualizing Asterisk installations can

negate the need for multi-tennent

systems and IP centrex

Page 21: Virtualizing Asterisk - Presented at Digium Asterisk World, Feb 2008, Miami, Florida

Asterisk Clouding

• Currently, there are working installations

of Asterisk utilizing Amazon EC2of Asterisk utilizing Amazon EC2

• As a test, we’ve installed the dialer

application on EC2 based instances

• The added value of running virtual dialers

using EC2 is to get the dialer power you using EC2 is to get the dialer power you

need – when you need it and not more

• Performance during the test was identical

to that of VMWARE dedicated servers

Page 22: Virtualizing Asterisk - Presented at Digium Asterisk World, Feb 2008, Miami, Florida

Where to from here?

Page 23: Virtualizing Asterisk - Presented at Digium Asterisk World, Feb 2008, Miami, Florida

Development from the past�

• Today’s over excessive use of VM type run-

time environments do not fit well with time environments do not fit well with

virtualization

• Working with virtual servers require a return to

basics for most developers, returning to

paradigms of high-speed optimizations and low

memory foot printsmemory foot prints

• The more optimal your runtime is, the more

performance you’ll get from your virtual servers

environment

Page 24: Virtualizing Asterisk - Presented at Digium Asterisk World, Feb 2008, Miami, Florida

Optimize for -Optimize for -

Execute like -Execute like -

Page 25: Virtualizing Asterisk - Presented at Digium Asterisk World, Feb 2008, Miami, Florida

Pooled Provisioning

• Handling multiple VM images (or EC2 AMIs)

can be a hasslecan be a hassle

• Utilizing pooled provisioning and programmatic

API’s, your provisioning process can be

centralized and simple

• Maintain a single VM image instance (or EC2

AMI), and deploy your software from a central AMI), and deploy your software from a central

location

Page 26: Virtualizing Asterisk - Presented at Digium Asterisk World, Feb 2008, Miami, Florida

Yes We Can!Yes We Can!Yes We Can!Yes We Can!

Barak H. Obama Image taken from http://www.obamarama.org

Page 27: Virtualizing Asterisk - Presented at Digium Asterisk World, Feb 2008, Miami, Florida

Rules of thumb for Asterisk Virtualization

• Ensure proper coding techniques to

lower platform overheadslower platform overheads

• Utilize central pooling provisioning for

ease of management

• Make use of programmatic API’s in a

layered platform approachlayered platform approach

• Ensure proper caching in your

application

Page 28: Virtualizing Asterisk - Presented at Digium Asterisk World, Feb 2008, Miami, Florida

Questions?

• Contact Information:

– Nir Simionovich– Nir Simionovich

– (e) [email protected]

– (p) +972-73-2557799

– (w) http://www.simionovich.com

– (w) http://www.greenfieldtech.net– (w) http://www.greenfieldtech.net

– (w) http://www.asterisk.org.il

– (MSN) [email protected]