Twilio Voice Applications with Amazon AWS S3 and EC2

30,928
-1

Published on

Published in: Business, Technology
1 Comment
48 Likes
Statistics
Notes
No Downloads
Views
Total Views
30,928
On Slideshare
0
From Embeds
0
Number of Embeds
18
Actions
Shares
0
Downloads
4
Comments
1
Likes
48
Embeds 0
No embeds

No notes for slide

Twilio Voice Applications with Amazon AWS S3 and EC2

  1. Copyright 2008 Twilio
  2. Empower Web Developers To build Voice Communication Apps that Make or Receive Phone Calls, using only Basic Web Development skills
  3. Simple API Only Five Building Blocks. Powerful API Build Advanced, Useful Applications Pay-As-You-Go Pricing No upfront, no commitment. Pay only for what you use.
  4. Voice Communications (we use every day) Sales Automation Order Inquiry Customer Relations Management Intelligent Call Distribution Emergency Notification Appointment Reminders Voicemail Typically Costly and Difficult to Build
  5. Costly to Build Telecom Engineers Tiny Workforce Specialized Skill Set Only Thousands of Qualified People Voice Applications (Cisco Certified, etc.) 2 $20B Market 1 Complex Open Source Options Steep Learning Curve
  6. Commoditize the Skills Telecom Engineers (thousands) Voice Communications Web Developers Largest engineering workforce! $20B Market Millions of Skilled Workers Processes Agile Development Commodity Hosting Existing Infrastructure Investment Twilio
  7. Telecom Goo HTTP XML MP3, wav, etc. Twilio HARD EASY!
  8. Simple API <Say> <Play> <Say>Thank you for calling XYZ Corp.</Say> <Play>http://mycompany.com/greeting.mp3</Play> <Record> <Record action=’http://mycompany.com/handler.php’/> <Gather> <Gather numDigits=’1’ action=’http://mycompany.com/handler.php’ /> <Dial> <Dial>415-867-5309</Dial> Just 5 Building Blocks
  9. Example: Example: Example:
  10. Next Grand Central In 15 Lines of PHP!
  11. Pay-As-You-Go Pricing 3¢ / minute 5¢ / minute toll free $5 / month per phone number No Contract, No Shenanigans Free Trial with 1000 Minutes Privileged and Confidential
  12. Twilio + AWS S3 Storage of Voice Recordings SQS Decouples Telecom Infrastructure from Billing EC2 Lots of CPU Intensive Services Handle 9-5 Peaks, Minimize Costs Off-Peak Pass Savings on to Customers! Privileged and Confidential
  13. Twilio + AWS HTTP VoIP Load Balancer Load Balancer Web Web API API VoIP VoIP Load Balancer Load Balancer Load Balancer Load Balancer Load Balancer Load Balancer Database Database Database EC2 Privileged and Confidential
  14. Twilio + AWS Realtime Transcoding <Play>http://myserver.com/foo.mp3</Play> 256kbps stereo MP3 ➜ 11khz 8bit mono ulaw <Record/> http://api.twilio.com/..../Recordings/RE12345 http://api.twilio.com/..../Recordings/RE12345.mp3 11khz 8bit mono wav ➜ MP3 EC2 Privileged and Confidential
  15. Twilio + AWS HTTP VoIP Load Balancer Load Balancer Web Web API API VoIP VoIP Load Balancer Load Balancer Load Balancer Load Balancer Load Balancer Load Balancer Database Database Database Media Layer Media Layer EC2 Privileged and Confidential
  16. Twilio + AWS Cent5 3rd Party Software for All Machines (Apache, MySql, HaProxy, etc.) Automated Build Process (out of SVN) Rev’d Infrequently (Every couple months or so) AMI EC2 Privileged and Confidential
  17. Twilio + AWS At Boot Time, Pulls Twilio Code from SVN (What Code to Pull?) SVN AMI EC2 Privileged and Confidential
  18. Twilio + AWS Realms: At Boot Time, Pulls Twilio Code from SVN Dev, Stage, Prod (What Code Accounts Separate AWS to Pull?) Completely Firewalled Off Credentials Access Controlled SVN AMI EC2 Privileged and Confidential
  19. Twilio + AWS SVN Externals Each Realm has a “rootfs” in SVN Is overlaid on the AMI filesystem @ boottime svnroot/realm-config/dev/rootfs svnroot/realm-config/stage/rootfs svnroot/realm-config/prod/rootfs Each “rootfs” has SVN Externals Point to various Twilio code-bases @REV Bump versions independently in each realm Bump different code bases independently svnroot/realm-config/dev/rootfs: svnroot/some-codebase ➜ ./usr/local/some-codebase @HEAD svnroot/come-config-files ➜ ./etc/some-config-files @HEAD svnroot/realm-config/prod/rootfs: svnroot/some-codebase ➜ ./usr/local/some-codebase @12345 svnroot/come-config-files ➜ ./etc/some-config-files @12000 (Could also use branching / tagging just as easily.) Privileged and Confidential
  20. Twilio + AWS At Boot Time, Pulls Twilio Code from SVN (What Code to Pull?) svn export realm-config/$MYREALM/rootfs Pulls all code targeted at this realm, dropped correctly in the filesystem! SVN AMI EC2 Privileged and Confidential
  21. Twilio + AWS Launches and Destroys Instances Coordinates Load Balancers UI + Pubsub + REST BOXCONFIG SVN AMI EC2 Privileged and Confidential
  22. Twilio + AWS Each Instance Serves One Or More “Roles” Purpose of the Instance (VoIP, web, API, transcoding, etc.) Set of Init scripts EC2 Security Group Nagios Settings At Boot, Boxconfig: Starts Correct Services Notifies All Load Balancers Updates Nagios Privileged and Confidential
  23. Twilio + AWS Machine Startup/Shutdown Boxconfig 1. Launch Instances System 3 PUBSUB 2. Configure Services per Role 3 3. Notify Interested Load Balancers 1 HTTP VoIP Load Balancer Load Balancer Web Web API API VoIP VoIP Load Balancer Load Balancer Load Balancer 3 Load Balancer Load Balancer 3 Load Balancer Database Database Database Media Layer Media Layer Media Laye 2 Privileged and Confidential
  24. EC2 Learnings Test “Roles” on Instance Sizes Find optimal cost / performance tradeoff Great for Load Testing Spin up a test cluster, fire traffic, spin down... Total cost: $5-10! Great for Failure Testing Hrm, what happens if I shoot this database... terminateInstances() Privileged and Confidential
  25. Jeff Lawson jeff@twilio.com http://www.twilio.com Twitter: @twilio Privileged and Confidential

×