SlideShare una empresa de Scribd logo
1 de 28
Descargar para leer sin conexión
Tutorial: Load testing
XMPP servers with Plain
Old Erlang
EUC 2015 tutorial, Stockholm
Paweł Pikuła
Who am I?
• Paweł Pikuła pawel.pikula@erlang-solutions.com
• Developer @ Erlang Solutions Ltd. Cracow office
• I work on MongooseIM XMPP server and some
IoT related project.
• github.com/ppikula
• twitter: @pawelpikula
Agenda
• What is load testing
• Introducing AMOC - our simple load testing tool
• Overview of our test infrastructure
• Breaking a single node
• Distributed scenario (scaling MIM and AMOC
horizontally)
• What to do next ?
Prepare the environment
• Install VirtualBox and Vagrant
• git clone https://github.com/ppikula/euc2015/
• Follow instructions from the README file (Setting
up the environment from a usb stick)
What is load testing ?
“In software engineering, performance testing is in
general testing performed to determine how a
system performs in terms of responsiveness and
stability under a particular workload. It can also
serve to investigate, measure, validate or verify
other quality attributes of the system, such as
scalability, reliability and resource usage.”
wikipedia
Why do we do load test ?
• Measure capacity of the whole system.
• Measure latencies, time to deliver and other quality
attributes.
• Find the bottlenecks in our system.
• Test a bad case scenarios under heavy load (ex. net splits,
overloaded DBs).
• Discover possible race conditions .
• Stress 3rd party software.
Types of tests - endurance
Types of traffic - stress
Types of traffic - spike
!
• Check if the system
can recover after the
spike
• How long does it take
to go back to the
normal state
TSUNG
• We‘ve been using it for a long time
• It does the job
• Tsung is dumb - doesn’t understand XMPP
• XML DSL …
• Manual setup
• It is not designed for bidirectional protocols
• HTTP semantics (request, transaction, page time)
• some strange race conditions? (I was never able to login 10K users every
time I tried I had ~9997 of them )
TSUNG DSL
OUR USE CASE
• stream management enabled (XEP 198) auto
respond to <r> with <a>
• authentication process requires acquiring a token
from http service
• carbon copies - multiple jabber resources
ESCALUS
• esl/ejabberd_tests use it for black box testing
• supports many transports (ws, bosh, tcp, tls)
• stanza generators
• built-in predicates (is_message, is_iq_result)
Escalus story
Can we use escalus ?
AMOC design goals
• Use the esl/escalus library
• Don’t reinvent the wheel - cooperate with graphite,
ansible, graphite notifications, graylog.
• Simple and practical
• No DSL - plain erlang
• build everything on one host
AMOC features
• Automatic deployment and environment setup via
ansible
• Exometer for collecting metrics - very easy to add a
new metric
• Uses modified erlang slave module
• Dynamically increase/decrease the amount of users
• Sends notifications about events mentioned above
Environment checklist
• File descriptors limit
• Check firewall rules
• TCP buffers and other options
• Increase local port range
• Create more network interfaces if you want to
generate more than 60K users
Why there is a limit of 60K
per interface?
• TCP port is a16 bit integer - we have only 65536
outgoing ports - reserved ones
AMOC Inside
!
• AMOC scenario - define init and start function
• AMOC controller - “user interface” start/stop
scenarios.
• The controller spawns users on AMOC slaves in
round robin fashion
SUT - MongooseIM
MongooseIM
• Fork of ejabberd 2.1.8
• Removed “non-scalable” extensions
• Added unit & integration tests (black box testing)
• Added many metrics
• Want to hear more? go to “MongooseIM - The Right
Tool for Scalable Messaging” by Michał Piotrowski
Task 1
break single box
Task 2
scale it !
Task3
Add custom metric to AMOC
• Message rate (spiral)
• Connected users count (counter)
• Time to deliver (histogram)
Future of AMOC
• automatic tests
• allow to pass inter arrival per scenario
• support for multiple scenarios
• ansible recipes for ubuntu/debian family
• dockerized version of AMOC?
• integration with elixir - that will allow us to create DSLs
Thanks !
Questions ?

Más contenido relacionado

La actualidad más candente

WEPA - Webdriver Enhanced Platform for Automation - WEPATest
WEPA - Webdriver Enhanced Platform for Automation - WEPATestWEPA - Webdriver Enhanced Platform for Automation - WEPATest
WEPA - Webdriver Enhanced Platform for Automation - WEPATest
Freddy Vega
 
CPAN Gems From The Far East
CPAN Gems From The Far EastCPAN Gems From The Far East
CPAN Gems From The Far East
lestrrat
 

La actualidad más candente (20)

Enterprise messaging
Enterprise messagingEnterprise messaging
Enterprise messaging
 
WEPA - Webdriver Enhanced Platform for Automation - WEPATest
WEPA - Webdriver Enhanced Platform for Automation - WEPATestWEPA - Webdriver Enhanced Platform for Automation - WEPATest
WEPA - Webdriver Enhanced Platform for Automation - WEPATest
 
Event Driven Architectures with Camel
Event Driven Architectures with CamelEvent Driven Architectures with Camel
Event Driven Architectures with Camel
 
Reactive Streams - László van den Hoek
Reactive Streams - László van den HoekReactive Streams - László van den Hoek
Reactive Streams - László van den Hoek
 
Rust kafka-5-2019-unskip
Rust kafka-5-2019-unskipRust kafka-5-2019-unskip
Rust kafka-5-2019-unskip
 
8th Athens Big Data Meetup - 1st Talk - Riding The Streaming Wave DIY Style
8th Athens Big Data Meetup - 1st Talk - Riding The Streaming Wave DIY Style8th Athens Big Data Meetup - 1st Talk - Riding The Streaming Wave DIY Style
8th Athens Big Data Meetup - 1st Talk - Riding The Streaming Wave DIY Style
 
OSMC 2021 | Monitoring Open Source Hardware
OSMC 2021 | Monitoring Open Source HardwareOSMC 2021 | Monitoring Open Source Hardware
OSMC 2021 | Monitoring Open Source Hardware
 
ruby + websocket + haproxy
ruby + websocket + haproxyruby + websocket + haproxy
ruby + websocket + haproxy
 
Integrating PostgreSql with RabbitMQ
Integrating PostgreSql with RabbitMQIntegrating PostgreSql with RabbitMQ
Integrating PostgreSql with RabbitMQ
 
Building a company-wide data pipeline on Apache Kafka - engineering for 150 b...
Building a company-wide data pipeline on Apache Kafka - engineering for 150 b...Building a company-wide data pipeline on Apache Kafka - engineering for 150 b...
Building a company-wide data pipeline on Apache Kafka - engineering for 150 b...
 
OSMC 2021 | Robotmk: You don’t run IT – you deliver services!
OSMC 2021 | Robotmk: You don’t run IT – you deliver services!OSMC 2021 | Robotmk: You don’t run IT – you deliver services!
OSMC 2021 | Robotmk: You don’t run IT – you deliver services!
 
Jakarta EE 8 on JDK17
Jakarta EE 8 on JDK17Jakarta EE 8 on JDK17
Jakarta EE 8 on JDK17
 
Rust with-kafka-07-02-2019
Rust with-kafka-07-02-2019Rust with-kafka-07-02-2019
Rust with-kafka-07-02-2019
 
All of the thing about Postman
All of the thing about PostmanAll of the thing about Postman
All of the thing about Postman
 
jLove 2020 - Micronaut and graalvm: The power of AoT
jLove 2020 - Micronaut and graalvm: The power of AoTjLove 2020 - Micronaut and graalvm: The power of AoT
jLove 2020 - Micronaut and graalvm: The power of AoT
 
Reactive Micro Services with Java seminar
Reactive Micro Services with Java seminarReactive Micro Services with Java seminar
Reactive Micro Services with Java seminar
 
PostgreSQL: meet your queue
PostgreSQL: meet your queuePostgreSQL: meet your queue
PostgreSQL: meet your queue
 
CPAN Gems From The Far East
CPAN Gems From The Far EastCPAN Gems From The Far East
CPAN Gems From The Far East
 
[Draft] Fast Prototyping with DPDK and eBPF in Containernet
[Draft] Fast Prototyping with DPDK and eBPF in Containernet[Draft] Fast Prototyping with DPDK and eBPF in Containernet
[Draft] Fast Prototyping with DPDK and eBPF in Containernet
 
Coroutines in Kotlin
Coroutines in KotlinCoroutines in Kotlin
Coroutines in Kotlin
 

Similar a EUC2015 - Load testing XMPP servers with Plain Old Erlang

Real time system_performance_mon
Real time system_performance_monReal time system_performance_mon
Real time system_performance_mon
Tomas Doran
 
Messaging, interoperability and log aggregation - a new framework
Messaging, interoperability and log aggregation - a new frameworkMessaging, interoperability and log aggregation - a new framework
Messaging, interoperability and log aggregation - a new framework
Tomas Doran
 
Cooking a rabbit pie
Cooking a rabbit pieCooking a rabbit pie
Cooking a rabbit pie
Tomas Doran
 
Agile Lab_BigData_Meetup_AKKA
Agile Lab_BigData_Meetup_AKKAAgile Lab_BigData_Meetup_AKKA
Agile Lab_BigData_Meetup_AKKA
Paolo Platter
 

Similar a EUC2015 - Load testing XMPP servers with Plain Old Erlang (20)

Real time system_performance_mon
Real time system_performance_monReal time system_performance_mon
Real time system_performance_mon
 
Fastest Servlets in the West
Fastest Servlets in the WestFastest Servlets in the West
Fastest Servlets in the West
 
Stream Computing (The Engineer's Perspective)
Stream Computing (The Engineer's Perspective)Stream Computing (The Engineer's Perspective)
Stream Computing (The Engineer's Perspective)
 
Virtual Flink Forward 2020: How Streaming Helps Your Staging Environment and ...
Virtual Flink Forward 2020: How Streaming Helps Your Staging Environment and ...Virtual Flink Forward 2020: How Streaming Helps Your Staging Environment and ...
Virtual Flink Forward 2020: How Streaming Helps Your Staging Environment and ...
 
Jolt: Distributed, fault-tolerant test running at scale using Mesos
Jolt: Distributed, fault-tolerant test running at scale using MesosJolt: Distributed, fault-tolerant test running at scale using Mesos
Jolt: Distributed, fault-tolerant test running at scale using Mesos
 
Messaging, interoperability and log aggregation - a new framework
Messaging, interoperability and log aggregation - a new frameworkMessaging, interoperability and log aggregation - a new framework
Messaging, interoperability and log aggregation - a new framework
 
Cooking a rabbit pie
Cooking a rabbit pieCooking a rabbit pie
Cooking a rabbit pie
 
Using Apache Camel as AKKA
Using Apache Camel as AKKAUsing Apache Camel as AKKA
Using Apache Camel as AKKA
 
Machine Learning With H2O vs SparkML
Machine Learning With H2O vs SparkMLMachine Learning With H2O vs SparkML
Machine Learning With H2O vs SparkML
 
Performance Benchmarking: Tips, Tricks, and Lessons Learned
Performance Benchmarking: Tips, Tricks, and Lessons LearnedPerformance Benchmarking: Tips, Tricks, and Lessons Learned
Performance Benchmarking: Tips, Tricks, and Lessons Learned
 
The Why and How of Scala at Twitter
The Why and How of Scala at TwitterThe Why and How of Scala at Twitter
The Why and How of Scala at Twitter
 
Hot to build continuously processing for 24/7 real-time data streaming platform?
Hot to build continuously processing for 24/7 real-time data streaming platform?Hot to build continuously processing for 24/7 real-time data streaming platform?
Hot to build continuously processing for 24/7 real-time data streaming platform?
 
Sanger, upcoming Openstack for Bio-informaticians
Sanger, upcoming Openstack for Bio-informaticiansSanger, upcoming Openstack for Bio-informaticians
Sanger, upcoming Openstack for Bio-informaticians
 
Flexible compute
Flexible computeFlexible compute
Flexible compute
 
[AWS Dev Day] 실습워크샵 | Amazon EKS 핸즈온 워크샵
 [AWS Dev Day] 실습워크샵 | Amazon EKS 핸즈온 워크샵 [AWS Dev Day] 실습워크샵 | Amazon EKS 핸즈온 워크샵
[AWS Dev Day] 실습워크샵 | Amazon EKS 핸즈온 워크샵
 
Tools. Techniques. Trouble?
Tools. Techniques. Trouble?Tools. Techniques. Trouble?
Tools. Techniques. Trouble?
 
Agile Lab_BigData_Meetup_AKKA
Agile Lab_BigData_Meetup_AKKAAgile Lab_BigData_Meetup_AKKA
Agile Lab_BigData_Meetup_AKKA
 
Kubernetes at NU.nl (Kubernetes meetup 2019-09-05)
Kubernetes at NU.nl   (Kubernetes meetup 2019-09-05)Kubernetes at NU.nl   (Kubernetes meetup 2019-09-05)
Kubernetes at NU.nl (Kubernetes meetup 2019-09-05)
 
Oleksandr Khotemskyi - Serverless architecture and how to apply it in Automa...
Oleksandr Khotemskyi  - Serverless architecture and how to apply it in Automa...Oleksandr Khotemskyi  - Serverless architecture and how to apply it in Automa...
Oleksandr Khotemskyi - Serverless architecture and how to apply it in Automa...
 
Олександр Хотемський:”Serverless архітектура та її застосування в автоматизац...
Олександр Хотемський:”Serverless архітектура та її застосування в автоматизац...Олександр Хотемський:”Serverless архітектура та її застосування в автоматизац...
Олександр Хотемський:”Serverless архітектура та її застосування в автоматизац...
 

Último

CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
anilsa9823
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
anilsa9823
 

Último (20)

Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 

EUC2015 - Load testing XMPP servers with Plain Old Erlang

  • 1. Tutorial: Load testing XMPP servers with Plain Old Erlang EUC 2015 tutorial, Stockholm Paweł Pikuła
  • 2. Who am I? • Paweł Pikuła pawel.pikula@erlang-solutions.com • Developer @ Erlang Solutions Ltd. Cracow office • I work on MongooseIM XMPP server and some IoT related project. • github.com/ppikula • twitter: @pawelpikula
  • 3. Agenda • What is load testing • Introducing AMOC - our simple load testing tool • Overview of our test infrastructure • Breaking a single node • Distributed scenario (scaling MIM and AMOC horizontally) • What to do next ?
  • 4. Prepare the environment • Install VirtualBox and Vagrant • git clone https://github.com/ppikula/euc2015/ • Follow instructions from the README file (Setting up the environment from a usb stick)
  • 5. What is load testing ? “In software engineering, performance testing is in general testing performed to determine how a system performs in terms of responsiveness and stability under a particular workload. It can also serve to investigate, measure, validate or verify other quality attributes of the system, such as scalability, reliability and resource usage.” wikipedia
  • 6. Why do we do load test ? • Measure capacity of the whole system. • Measure latencies, time to deliver and other quality attributes. • Find the bottlenecks in our system. • Test a bad case scenarios under heavy load (ex. net splits, overloaded DBs). • Discover possible race conditions . • Stress 3rd party software.
  • 7. Types of tests - endurance
  • 8. Types of traffic - stress
  • 9. Types of traffic - spike ! • Check if the system can recover after the spike • How long does it take to go back to the normal state
  • 10. TSUNG • We‘ve been using it for a long time • It does the job • Tsung is dumb - doesn’t understand XMPP • XML DSL … • Manual setup • It is not designed for bidirectional protocols • HTTP semantics (request, transaction, page time) • some strange race conditions? (I was never able to login 10K users every time I tried I had ~9997 of them )
  • 12. OUR USE CASE • stream management enabled (XEP 198) auto respond to <r> with <a> • authentication process requires acquiring a token from http service • carbon copies - multiple jabber resources
  • 13. ESCALUS • esl/ejabberd_tests use it for black box testing • supports many transports (ws, bosh, tcp, tls) • stanza generators • built-in predicates (is_message, is_iq_result)
  • 15. Can we use escalus ?
  • 16. AMOC design goals • Use the esl/escalus library • Don’t reinvent the wheel - cooperate with graphite, ansible, graphite notifications, graylog. • Simple and practical • No DSL - plain erlang • build everything on one host
  • 17. AMOC features • Automatic deployment and environment setup via ansible • Exometer for collecting metrics - very easy to add a new metric • Uses modified erlang slave module • Dynamically increase/decrease the amount of users • Sends notifications about events mentioned above
  • 18. Environment checklist • File descriptors limit • Check firewall rules • TCP buffers and other options • Increase local port range • Create more network interfaces if you want to generate more than 60K users
  • 19. Why there is a limit of 60K per interface? • TCP port is a16 bit integer - we have only 65536 outgoing ports - reserved ones
  • 20. AMOC Inside ! • AMOC scenario - define init and start function • AMOC controller - “user interface” start/stop scenarios. • The controller spawns users on AMOC slaves in round robin fashion
  • 22. MongooseIM • Fork of ejabberd 2.1.8 • Removed “non-scalable” extensions • Added unit & integration tests (black box testing) • Added many metrics • Want to hear more? go to “MongooseIM - The Right Tool for Scalable Messaging” by Michał Piotrowski
  • 25. Task3 Add custom metric to AMOC • Message rate (spiral) • Connected users count (counter) • Time to deliver (histogram)
  • 26. Future of AMOC • automatic tests • allow to pass inter arrival per scenario • support for multiple scenarios • ansible recipes for ubuntu/debian family • dockerized version of AMOC? • integration with elixir - that will allow us to create DSLs