David Currie – Senior Software Engineer 
30th September 2014 
Taking the Application Server 
to Web Scale with 
Netflix Open Source Software 
© 2014 IBM Corporation
© 2014 IBM Corporation 
Important Disclaimers 
THE INFORMATION CONTAINED IN THIS PRESENTATION IS PROVIDED FOR INFORMATIONAL PURPOSES ONLY. 
WHILST EFFORTS WERE MADE TO VERIFY THE COMPLETENESS AND ACCURACY OF THE INFORMATION 
CONTAINED IN THIS PRESENTATION, IT IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
IMPLIED. 
ALL PERFORMANCE DATA INCLUDED IN THIS PRESENTATION HAVE BEEN GATHERED IN A CONTROLLED 
ENVIRONMENT. YOUR OWN TEST RESULTS MAY VARY BASED ON HARDWARE, SOFTWARE OR INFRASTRUCTURE 
DIFFERENCES. 
ALL DATA INCLUDED IN THIS PRESENTATION ARE MEANT TO BE USED ONLY AS A GUIDE. 
IN ADDITION, THE INFORMATION CONTAINED IN THIS PRESENTATION IS BASED ON IBM’S CURRENT PRODUCT 
PLANS AND STRATEGY, WHICH ARE SUBJECT TO CHANGE BY IBM, WITHOUT NOTICE. 
IBM AND ITS AFFILIATED COMPANIES SHALL NOT BE RESPONSIBLE FOR ANY DAMAGES ARISING OUT OF THE USE 
OF, OR OTHERWISE RELATED TO, THIS PRESENTATION OR ANY OTHER DOCUMENTATION. 
NOTHING CONTAINED IN THIS PRESENTATION IS INTENDED TO, OR SHALL HAVE THE EFFECT OF: 
- CREATING ANY WARRANT OR REPRESENTATION FROM IBM, ITS AFFILIATED COMPANIES OR ITS OR THEIR 
SUPPLIERS AND/OR LICENSORS
© 2014 IBM Corporation 
david_currie@uk.ibm.com @dcurrie http://uk.linkedin.com/in/davidcurrie/
© 2014 IBM Corporation
© 2014 IBM Corporation
© 2014 IBM Corporation 
WebSphere 
Liberty Profile 
WebSphere 
eXtreme 
Scale 
(WXS) 
JAX-RS 
Servlet Filter 
Data Service 
Facade 
Service Facade 
Data Tier 
App 
Specific 
Caching 
WXS 
Client 
nginx 
Browser 
App 
jQuery/DOJO 
Hybrid 
Worklight 
App 
jQuery/DOJO 
nginx 
IBM 
Worklight 
http://bit.ly/ 
acmeairblog
© 2014 IBM Corporation 
programmableweb.com 2012 
Peak Performance 
and Scale 
4.3 billion API calls/day 

© 2014 IBM Corporation 
Operational 
Visibility 

DevOps  
HA & DR 
Elastic scaling 
© 2014 IBM Corporation
© 2014 IBM Corporation 
http://techblog.netflix.com 
http://netflix.github.io
© 2014 IBM Corporation 
2012 
Acme Air run 
on IBM Cloud at 
“Web Scale” 
2013 
2014 
SPECjEnterprise 
Portability cloud 
Sample application 
cloud prize work 
prize work 
Acme Air Cloud/Mobile 
Sample/Benchmark born 
https://github.com/EmergingTechnologyInstitute
© 2014 IBM Corporation 
Monolithic 
Application
© 2014 IBM Corporation 
Monolithic 
Application 
Scaled
© 2014 IBM Corporation 
Mircoservices 
Application
© 2014 IBM Corporation 
Microservices 
Application 
Scaled
© 2014 IBM Corporation 
Service 
Discovery 
Eureka
Service 
Invocation 
Ribbon 
© 2014 IBM Corporation
© 2014 IBM Corporation 
Hope is not a 
design method 
“ 
Michael Nygard, Release It! ”
© 2014 IBM Corporation 
App Container 
User Request 
Dependency A Dependency B Dependency C 
Dependency D Dependency E 
Dependency F 
Dependency G Dependency H 
Dependency I 
Dependency J Dependency K 
Dependency L 
Dependency M Dependency N Dependency O
© 2014 IBM Corporation 
User Request 
App Container 
Dependency A Dependency B Dependency C 
Dependency D Dependency E 
Dependency F 
Dependency G Dependency H 
Dependency I 
Dependency J Dependency K 
Dependency L 
Dependency M Dependency N Dependency O 
FAILURE!
© 2014 IBM Corporation 
User Request 
Dependency A Dependency B Dependency C 
Dependency D Dependency E 
Dependency F 
Dependency G Dependency H 
Dependency I 
Dependency J Dependency K 
Dependency L 
Dependency M Dependency N Dependency O 
User Request 
User Request 
User Request 
User Request 
App Container 
THREAD 
STARVATION!
© 2014 IBM Corporation 
User Request 
Dependency A Dependency B Dependency C 
Dependency D Dependency E 
Dependency F 
Dependency G Dependency H 
Dependency I 
Dependency A 
(5 Threads) 
Dependency B 
(5 Threads) 
Dependency C 
(10 Threads) 
Dependency D 
(5 Threads) 
Dependency E 
(10 Threads) 
Dependency F 
(5 Threads) 
Dependency G 
(10 Threads) 
Dependency H 
(5 Threads) 
App Container 
FAIL FAST
Circuit 
Breaker 
Hystrix 
© 2014 IBM Corporation 
https://www.flickr.com/photos/leafbug/409950515 CC-BY-ND 2.0
© 2014 IBM Corporation
getLongProperty(“mywebapp.lock.waitTime", 1000); 
© 2014 IBM Corporation 
DynamicLongProperty timeToWait = 
DynamicPropertyFactory.getInstance(). 
timeToWait.get(); 
Application 
Runtime 
URL 
DB 
App Property File 
Libraries 
Container 
Dynamic 
Configuration 
Archaius
Small download 
Low memory usage 
Simple configuration 
Fast start up 
Easy access 
Free tooling 
© 2014 IBM Corporation
zosSecurity zosTransaction collectiveController 
jaxws 
jmsMdb wasJmsSecurity 
mongodb jaxb 
wsSecurity wmqJmsClient 
wasJmsClient wasJmsServer 
oauth collectiveMember ldapRegistry webCache 
ejbLite cdi managedBeans 
localConnector beanValidation 
monitor sessionDatabase 
© 2014 IBM Corporation 
z/OS 
ND 
Base, Express 
Liberty Core 
Application 
Manager 
jsp 
servlet jpa 
Feature Manager HTTP Transport 
jsf 
jndi jdbc 
wab 
blueprint 
jaxrs 
json 
restConnector 
osgi.jpa 
appSecurity 
ssl 
clusterMember 
concurrent 
zosWlm 
Liberty 
Features
© 2014 IBM Corporation 
GitHub 
NetflixOSS 
Cloud Foundry 
Zero Turnaround 
Jenkins 
Opscode 
Chef 
Apache Maven 
IBM UrbanCode Deploy 
IntelliJ IDEA 
Apache Ant 
Gradle 
WebSphere 
Developer Tools 
Liberty 
http://wasdev.net 
http://wasdev.github.io
© 2014 IBM Corporation
© 2014 IBM Corporation
DynamicLongProperty timeToWait = 
DynamicPropertyFactory.getInstance(). 
getLongProperty(“mywebapp.lock.waitTime", 1000); 
timeToWait.get(); 
server.xml 
<archaius> 
<myWebapp><lock><waitTime>500</waitTime></lock></myWebapp> 
</archaius> 
33 © 2014 IBM Corporation
public class MyCommand extends HystrixCommand<String> { 
protected String run() { // remote call } 
protected String getFallback() { // local fallback } 
} 
String result = new MyCommand().execute(); 
server.xml 
<hystrix> 
<command><MyCommand> 
<execution><isolation><thread> 
<timeoutInMilliseconds>10000</timeoutInMilliseconds> 
</thread></isolation></execution> 
</MyCommand></command> 
</hystrix> 
34 © 2014 IBM Corporation
35 © 2014 IBM Corporation
36 © 2014 IBM Corporation
© 2014 IBM Corporation
www.ibm.com/developer 
Discover 
new technical resources. 
Develop 
your coding skills. 
Connect 
with developers. 
ibm.biz/javaone2014 
© 2014 IBM Corporation 
Visit Booth 5511 to learn about Cloud, DevOps and Mobile solutions
IBM Developer Kits for Java 
ibm.com/java/jdk 
WebShere Liberty Profile 
wasdev.net 
IBM Bluemix 
ibm.com/bluemix 
IBM Developer Kits for Node.js 
ibm.com/developerworks/web/nodesdk/ 
39 © 2014 IBM Corporation
© 2014 IBM Corporation 
Copyright and Trademarks 
© IBM Corporation 2014. All Rights Reserved. 
IBM, the IBM logo, and ibm.com are trademarks or registered trademarks of International 
Business Machines Corp., and registered in many jurisdictions worldwide. 
Other product and service names might be trademarks of IBM or other companies. 
A current list of IBM trademarks is available on the Web – see the IBM “Copyright and 
trademark information” page at URL: www.ibm.com/legal/copytrade.shtml 
40

Taking the Application Server to Web Scale with Netflix Open Source Software

  • 1.
    David Currie –Senior Software Engineer 30th September 2014 Taking the Application Server to Web Scale with Netflix Open Source Software © 2014 IBM Corporation
  • 2.
    © 2014 IBMCorporation Important Disclaimers THE INFORMATION CONTAINED IN THIS PRESENTATION IS PROVIDED FOR INFORMATIONAL PURPOSES ONLY. WHILST EFFORTS WERE MADE TO VERIFY THE COMPLETENESS AND ACCURACY OF THE INFORMATION CONTAINED IN THIS PRESENTATION, IT IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. ALL PERFORMANCE DATA INCLUDED IN THIS PRESENTATION HAVE BEEN GATHERED IN A CONTROLLED ENVIRONMENT. YOUR OWN TEST RESULTS MAY VARY BASED ON HARDWARE, SOFTWARE OR INFRASTRUCTURE DIFFERENCES. ALL DATA INCLUDED IN THIS PRESENTATION ARE MEANT TO BE USED ONLY AS A GUIDE. IN ADDITION, THE INFORMATION CONTAINED IN THIS PRESENTATION IS BASED ON IBM’S CURRENT PRODUCT PLANS AND STRATEGY, WHICH ARE SUBJECT TO CHANGE BY IBM, WITHOUT NOTICE. IBM AND ITS AFFILIATED COMPANIES SHALL NOT BE RESPONSIBLE FOR ANY DAMAGES ARISING OUT OF THE USE OF, OR OTHERWISE RELATED TO, THIS PRESENTATION OR ANY OTHER DOCUMENTATION. NOTHING CONTAINED IN THIS PRESENTATION IS INTENDED TO, OR SHALL HAVE THE EFFECT OF: - CREATING ANY WARRANT OR REPRESENTATION FROM IBM, ITS AFFILIATED COMPANIES OR ITS OR THEIR SUPPLIERS AND/OR LICENSORS
  • 3.
    © 2014 IBMCorporation david_currie@uk.ibm.com @dcurrie http://uk.linkedin.com/in/davidcurrie/
  • 4.
    © 2014 IBMCorporation
  • 5.
    © 2014 IBMCorporation
  • 6.
    © 2014 IBMCorporation WebSphere Liberty Profile WebSphere eXtreme Scale (WXS) JAX-RS Servlet Filter Data Service Facade Service Facade Data Tier App Specific Caching WXS Client nginx Browser App jQuery/DOJO Hybrid Worklight App jQuery/DOJO nginx IBM Worklight http://bit.ly/ acmeairblog
  • 7.
    © 2014 IBMCorporation programmableweb.com 2012 Peak Performance and Scale 4.3 billion API calls/day 
  • 8.
    © 2014 IBMCorporation Operational Visibility 
  • 9.
    DevOps  HA& DR Elastic scaling © 2014 IBM Corporation
  • 10.
    © 2014 IBMCorporation http://techblog.netflix.com http://netflix.github.io
  • 11.
    © 2014 IBMCorporation 2012 Acme Air run on IBM Cloud at “Web Scale” 2013 2014 SPECjEnterprise Portability cloud Sample application cloud prize work prize work Acme Air Cloud/Mobile Sample/Benchmark born https://github.com/EmergingTechnologyInstitute
  • 12.
    © 2014 IBMCorporation Monolithic Application
  • 13.
    © 2014 IBMCorporation Monolithic Application Scaled
  • 14.
    © 2014 IBMCorporation Mircoservices Application
  • 15.
    © 2014 IBMCorporation Microservices Application Scaled
  • 16.
    © 2014 IBMCorporation Service Discovery Eureka
  • 17.
    Service Invocation Ribbon © 2014 IBM Corporation
  • 18.
    © 2014 IBMCorporation Hope is not a design method “ Michael Nygard, Release It! ”
  • 19.
    © 2014 IBMCorporation App Container User Request Dependency A Dependency B Dependency C Dependency D Dependency E Dependency F Dependency G Dependency H Dependency I Dependency J Dependency K Dependency L Dependency M Dependency N Dependency O
  • 20.
    © 2014 IBMCorporation User Request App Container Dependency A Dependency B Dependency C Dependency D Dependency E Dependency F Dependency G Dependency H Dependency I Dependency J Dependency K Dependency L Dependency M Dependency N Dependency O FAILURE!
  • 21.
    © 2014 IBMCorporation User Request Dependency A Dependency B Dependency C Dependency D Dependency E Dependency F Dependency G Dependency H Dependency I Dependency J Dependency K Dependency L Dependency M Dependency N Dependency O User Request User Request User Request User Request App Container THREAD STARVATION!
  • 22.
    © 2014 IBMCorporation User Request Dependency A Dependency B Dependency C Dependency D Dependency E Dependency F Dependency G Dependency H Dependency I Dependency A (5 Threads) Dependency B (5 Threads) Dependency C (10 Threads) Dependency D (5 Threads) Dependency E (10 Threads) Dependency F (5 Threads) Dependency G (10 Threads) Dependency H (5 Threads) App Container FAIL FAST
  • 23.
    Circuit Breaker Hystrix © 2014 IBM Corporation https://www.flickr.com/photos/leafbug/409950515 CC-BY-ND 2.0
  • 24.
    © 2014 IBMCorporation
  • 25.
    getLongProperty(“mywebapp.lock.waitTime", 1000); ©2014 IBM Corporation DynamicLongProperty timeToWait = DynamicPropertyFactory.getInstance(). timeToWait.get(); Application Runtime URL DB App Property File Libraries Container Dynamic Configuration Archaius
  • 26.
    Small download Lowmemory usage Simple configuration Fast start up Easy access Free tooling © 2014 IBM Corporation
  • 27.
    zosSecurity zosTransaction collectiveController jaxws jmsMdb wasJmsSecurity mongodb jaxb wsSecurity wmqJmsClient wasJmsClient wasJmsServer oauth collectiveMember ldapRegistry webCache ejbLite cdi managedBeans localConnector beanValidation monitor sessionDatabase © 2014 IBM Corporation z/OS ND Base, Express Liberty Core Application Manager jsp servlet jpa Feature Manager HTTP Transport jsf jndi jdbc wab blueprint jaxrs json restConnector osgi.jpa appSecurity ssl clusterMember concurrent zosWlm Liberty Features
  • 28.
    © 2014 IBMCorporation GitHub NetflixOSS Cloud Foundry Zero Turnaround Jenkins Opscode Chef Apache Maven IBM UrbanCode Deploy IntelliJ IDEA Apache Ant Gradle WebSphere Developer Tools Liberty http://wasdev.net http://wasdev.github.io
  • 29.
    © 2014 IBMCorporation
  • 30.
    © 2014 IBMCorporation
  • 31.
    DynamicLongProperty timeToWait = DynamicPropertyFactory.getInstance(). getLongProperty(“mywebapp.lock.waitTime", 1000); timeToWait.get(); server.xml <archaius> <myWebapp><lock><waitTime>500</waitTime></lock></myWebapp> </archaius> 33 © 2014 IBM Corporation
  • 32.
    public class MyCommandextends HystrixCommand<String> { protected String run() { // remote call } protected String getFallback() { // local fallback } } String result = new MyCommand().execute(); server.xml <hystrix> <command><MyCommand> <execution><isolation><thread> <timeoutInMilliseconds>10000</timeoutInMilliseconds> </thread></isolation></execution> </MyCommand></command> </hystrix> 34 © 2014 IBM Corporation
  • 33.
    35 © 2014IBM Corporation
  • 34.
    36 © 2014IBM Corporation
  • 35.
    © 2014 IBMCorporation
  • 36.
    www.ibm.com/developer Discover newtechnical resources. Develop your coding skills. Connect with developers. ibm.biz/javaone2014 © 2014 IBM Corporation Visit Booth 5511 to learn about Cloud, DevOps and Mobile solutions
  • 37.
    IBM Developer Kitsfor Java ibm.com/java/jdk WebShere Liberty Profile wasdev.net IBM Bluemix ibm.com/bluemix IBM Developer Kits for Node.js ibm.com/developerworks/web/nodesdk/ 39 © 2014 IBM Corporation
  • 38.
    © 2014 IBMCorporation Copyright and Trademarks © IBM Corporation 2014. All Rights Reserved. IBM, the IBM logo, and ibm.com are trademarks or registered trademarks of International Business Machines Corp., and registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web – see the IBM “Copyright and trademark information” page at URL: www.ibm.com/legal/copytrade.shtml 40