SlideShare ist ein Scribd-Unternehmen logo
1 von 54
Scale
for Your Java Applications
Philipp Krenn @xeraa
@xeraa
Developer
@xeraa
@xeraa
Terminology
Cluster, Node, Index, Shard
@xeraa
Disclaimer
This is not a benchmark
@xeraa
Injector
@xeraa
Download
http://download.elastic.co/workshops/basic-kibana/injector/
injector-7.0.jar
@xeraa
Use
$ java -jar injector-7.0.jar 
--nb 1000 --bulk 100 
--debug 
--elasticsearch --es.host http://localhost:9200 
--es.user elastic --es.pass changeme 
--es.index person 
--console --cs.pretty
@xeraa
{
"name": "Mamadou Colombe",
"dateofbirth": "2009-12-26",
"gender": "male",
"children": 4,
"marketing": {
"cars": null,
"shoes": null,
"toys": 1688,
"fashion": null,
"music": 243,
"garden": null,
"electronic": 1222,
"hifi": null,
"food": null
},
"address": {
"country": "France",
"zipcode": "75000",
"city": "Paris",
"countrycode": "FR",
"location": {
"lon": 2.3250817954678284,
"lat": 48.857148516731385
}
}
}
@xeraa
Monitoring
@xeraa
time
$ time java -jar injector-7.0.jar ...
@xeraa
Stack Monitoring
@xeraa
Bulk Requests
@xeraa
1,000 Docs & Bulk Size 1
Executed in 37.87 secs fish external
usr time 13.08 secs 135.00 micros 13.08 secs
sys time 1.00 secs 752.00 micros 1.00 secs
@xeraa
1,000 Docs & Bulk Size 100
Executed in 4.01 secs fish external
usr time 7.49 secs 134.00 micros 7.49 secs
sys time 0.43 secs 738.00 micros 0.43 secs
@xeraa
1,000 Docs & Bulk Size 100
Executed in 3.91 secs fish external
usr time 6.34 secs 138.00 micros 6.34 secs
sys time 0.38 secs 843.00 micros 0.38 secs
@xeraa
Optimal Bulk Size?
@xeraa
It Depends
Document size (100B, 1KB, 100KB, 1MB,...)
Number of nodes & shards
Node size
Load on the cluster
@xeraa
Refresh
@xeraa
index.refresh_interval
Default 1s
30s or -1
@xeraa
10,000 Docs & Refresh 1s
Executed in 10.23 secs fish external
usr time 11.50 secs 124.00 micros 11.50 secs
sys time 0.77 secs 845.00 micros 0.77 secs
@xeraa
10,000 Docs & Refresh 30s
Executed in 10.02 secs fish external
usr time 11.87 secs 120.00 micros 11.87 secs
sys time 0.74 secs 730.00 micros 0.74 secs
@xeraa
Load
Distribution
@xeraa
Nodes
Master
Data
Coordinating
@xeraa
Topology
Sniffing
Cloud Proxy
@xeraa
Distribution
Round Robin
Adaptive Replica Selection for searches
@xeraa
Index & Shard
Strategy
@xeraa
Defaults
7.0: 1 primary, 1 replica
Before: 5 primary, 1 replica
@xeraa
Index Patterns
Static vs Time-Based
@xeraa
Time-Based
Don't _delete_by_query
Do daily / weekly / ... patterns
Or even better Rollover
@xeraa
Shard Size
>10GB, maybe ~50GB
It depends
@xeraa
Shards per GB Heap
<20
@xeraa
Pagination
@xeraa
Pagination
GET person/_search
{
"from" : 0,
"size" : 10,
"sort": [
{
"dateofbirth": {
"order": "asc"
}
}
]
}
@xeraa
Deep Pagination
GET person/_search
{
"from" : 5000,
"size" : 10,
"sort": [
{
"dateofbirth": {
"order": "asc"
}
}
]
}
@xeraa
Error
GET person/_search
{
"from" : 10000,
"size" : 10,
"sort": [
{
"dateofbirth": {
"order": "asc"
}
}
]
}
@xeraa
For Your Protection
index.max_result_window: 10000
Search After
Scroll
@xeraa
Profiler
@xeraa
Benchmarks
@xeraa
Rally
Macrobenchmarking Framework for
Elasticsearch
https://github.com/elastic/rally
@xeraa
Nightly Benchmarks
https://benchmarks.elastic.co
@xeraa
Conclusion
@xeraa
Topics
Monitoring
Bulk & Refresh
Load Distribution
@xeraa
Topics
Index & Shard Strategy
Pagination
Benchmarks
@xeraa
It Depends
@xeraa
Free & Open
@xeraa
Scale
for Your Java Applications
Philipp Krenn @xeraa
@xeraa

Weitere ähnliche Inhalte

Was ist angesagt?

Deployment with Fabric
Deployment with FabricDeployment with Fabric
Deployment with Fabric
andymccurdy
 
Puppet Camp Portland 2015: Introduction to Hiera (Beginner)
Puppet Camp Portland 2015: Introduction to Hiera (Beginner)Puppet Camp Portland 2015: Introduction to Hiera (Beginner)
Puppet Camp Portland 2015: Introduction to Hiera (Beginner)
Puppet
 

Was ist angesagt? (10)

To Hire, or to train, that is the question (Percona Live 2014)
To Hire, or to train, that is the question (Percona Live 2014)To Hire, or to train, that is the question (Percona Live 2014)
To Hire, or to train, that is the question (Percona Live 2014)
 
Konfigurasi vlan
Konfigurasi vlanKonfigurasi vlan
Konfigurasi vlan
 
Cloud patterns applied
Cloud patterns appliedCloud patterns applied
Cloud patterns applied
 
power-assert, mechanism and philosophy
power-assert, mechanism and philosophypower-assert, mechanism and philosophy
power-assert, mechanism and philosophy
 
Sending a for ahuh. win32 exploit development old school
Sending a for ahuh. win32 exploit development old schoolSending a for ahuh. win32 exploit development old school
Sending a for ahuh. win32 exploit development old school
 
Jk rubyslava 25
Jk rubyslava 25Jk rubyslava 25
Jk rubyslava 25
 
Rapid Infrastructure Provisioning
Rapid Infrastructure ProvisioningRapid Infrastructure Provisioning
Rapid Infrastructure Provisioning
 
Delegated Configuration with Multiple Hiera Databases - PuppetConf 2014
Delegated Configuration with Multiple Hiera Databases - PuppetConf 2014Delegated Configuration with Multiple Hiera Databases - PuppetConf 2014
Delegated Configuration with Multiple Hiera Databases - PuppetConf 2014
 
Deployment with Fabric
Deployment with FabricDeployment with Fabric
Deployment with Fabric
 
Puppet Camp Portland 2015: Introduction to Hiera (Beginner)
Puppet Camp Portland 2015: Introduction to Hiera (Beginner)Puppet Camp Portland 2015: Introduction to Hiera (Beginner)
Puppet Camp Portland 2015: Introduction to Hiera (Beginner)
 

Ähnlich wie JavaFest. Philipp Krenn. Scale Elasticsearch for Your Java Applications

High Performance Django
High Performance DjangoHigh Performance Django
High Performance Django
DjangoCon2008
 
High Performance Django 1
High Performance Django 1High Performance Django 1
High Performance Django 1
DjangoCon2008
 
Socket applications
Socket applicationsSocket applications
Socket applications
João Moura
 
Stack kicker devopsdays-london-2013
Stack kicker devopsdays-london-2013Stack kicker devopsdays-london-2013
Stack kicker devopsdays-london-2013
Simon McCartney
 
D Trace Support In My Sql Guide To Solving Reallife Performance Problems
D Trace Support In My Sql Guide To Solving Reallife Performance ProblemsD Trace Support In My Sql Guide To Solving Reallife Performance Problems
D Trace Support In My Sql Guide To Solving Reallife Performance Problems
MySQLConference
 

Ähnlich wie JavaFest. Philipp Krenn. Scale Elasticsearch for Your Java Applications (20)

RubyEnRails2007 - Dr Nic Williams - Keynote
RubyEnRails2007 - Dr Nic Williams - KeynoteRubyEnRails2007 - Dr Nic Williams - Keynote
RubyEnRails2007 - Dr Nic Williams - Keynote
 
Streamline Hadoop DevOps with Apache Ambari
Streamline Hadoop DevOps with Apache AmbariStreamline Hadoop DevOps with Apache Ambari
Streamline Hadoop DevOps with Apache Ambari
 
High Performance Django
High Performance DjangoHigh Performance Django
High Performance Django
 
High Performance Django 1
High Performance Django 1High Performance Django 1
High Performance Django 1
 
[Coscup 2012] JavascriptMVC
[Coscup 2012] JavascriptMVC[Coscup 2012] JavascriptMVC
[Coscup 2012] JavascriptMVC
 
Socket applications
Socket applicationsSocket applications
Socket applications
 
Django Performance Recipes
Django Performance RecipesDjango Performance Recipes
Django Performance Recipes
 
Padrino is agnostic
Padrino is agnosticPadrino is agnostic
Padrino is agnostic
 
Cassandra at Pollfish
Cassandra at PollfishCassandra at Pollfish
Cassandra at Pollfish
 
Cassandra at Pollfish
Cassandra at PollfishCassandra at Pollfish
Cassandra at Pollfish
 
Speed up R with parallel programming in the Cloud
Speed up R with parallel programming in the CloudSpeed up R with parallel programming in the Cloud
Speed up R with parallel programming in the Cloud
 
Stack kicker devopsdays-london-2013
Stack kicker devopsdays-london-2013Stack kicker devopsdays-london-2013
Stack kicker devopsdays-london-2013
 
C* Summit 2013: Real-Time Big Data with Storm, Cassandra, and In-Memory Compu...
C* Summit 2013: Real-Time Big Data with Storm, Cassandra, and In-Memory Compu...C* Summit 2013: Real-Time Big Data with Storm, Cassandra, and In-Memory Compu...
C* Summit 2013: Real-Time Big Data with Storm, Cassandra, and In-Memory Compu...
 
Declarative & workflow based infrastructure with Terraform
Declarative & workflow based infrastructure with TerraformDeclarative & workflow based infrastructure with Terraform
Declarative & workflow based infrastructure with Terraform
 
Lessons learned scaling big data in cloud
Lessons learned   scaling big data in cloudLessons learned   scaling big data in cloud
Lessons learned scaling big data in cloud
 
mongodb-introduction
mongodb-introductionmongodb-introduction
mongodb-introduction
 
Ultra fast web development with sinatra
Ultra fast web development with sinatraUltra fast web development with sinatra
Ultra fast web development with sinatra
 
D Trace Support In My Sql Guide To Solving Reallife Performance Problems
D Trace Support In My Sql Guide To Solving Reallife Performance ProblemsD Trace Support In My Sql Guide To Solving Reallife Performance Problems
D Trace Support In My Sql Guide To Solving Reallife Performance Problems
 
FreeBSD 2014 Flame Graphs
FreeBSD 2014 Flame GraphsFreeBSD 2014 Flame Graphs
FreeBSD 2014 Flame Graphs
 
Performance Profiling in Rust
Performance Profiling in RustPerformance Profiling in Rust
Performance Profiling in Rust
 

Mehr von FestGroup

JavaFest. Барух Садогурский. DevOps для разработчиков (или против них?!)
JavaFest. Барух Садогурский. DevOps для разработчиков (или против них?!)JavaFest. Барух Садогурский. DevOps для разработчиков (или против них?!)
JavaFest. Барух Садогурский. DevOps для разработчиков (или против них?!)
FestGroup
 
JavaFest. Денис Макогон. 6 заблуждений относительно современной Java
JavaFest. Денис Макогон. 6 заблуждений относительно современной JavaJavaFest. Денис Макогон. 6 заблуждений относительно современной Java
JavaFest. Денис Макогон. 6 заблуждений относительно современной Java
FestGroup
 
JavaFest. Антон Лемешко. Model-Driven Development in the Open Java Universe
JavaFest. Антон Лемешко. Model-Driven Development in the Open Java UniverseJavaFest. Антон Лемешко. Model-Driven Development in the Open Java Universe
JavaFest. Антон Лемешко. Model-Driven Development in the Open Java Universe
FestGroup
 

Mehr von FestGroup (10)

JavaFest. Барух Садогурский. DevOps для разработчиков (или против них?!)
JavaFest. Барух Садогурский. DevOps для разработчиков (или против них?!)JavaFest. Барух Садогурский. DevOps для разработчиков (или против них?!)
JavaFest. Барух Садогурский. DevOps для разработчиков (или против них?!)
 
JavaFest. Виктор Полищук. Legacy: как победить в гонке
JavaFest. Виктор Полищук. Legacy: как победить в гонкеJavaFest. Виктор Полищук. Legacy: как победить в гонке
JavaFest. Виктор Полищук. Legacy: как победить в гонке
 
JavaFest. Cedrick Lunven. Build APIS with SpringBoot - REST, GRPC, GRAPHQL wh...
JavaFest. Cedrick Lunven. Build APIS with SpringBoot - REST, GRPC, GRAPHQL wh...JavaFest. Cedrick Lunven. Build APIS with SpringBoot - REST, GRPC, GRAPHQL wh...
JavaFest. Cedrick Lunven. Build APIS with SpringBoot - REST, GRPC, GRAPHQL wh...
 
JavaFest. Grzegorz Piwowarek. Hazelcast - Hitchhiker’s Guide
JavaFest. Grzegorz Piwowarek. Hazelcast - Hitchhiker’s GuideJavaFest. Grzegorz Piwowarek. Hazelcast - Hitchhiker’s Guide
JavaFest. Grzegorz Piwowarek. Hazelcast - Hitchhiker’s Guide
 
JavaFest. Денис Макогон. 6 заблуждений относительно современной Java
JavaFest. Денис Макогон. 6 заблуждений относительно современной JavaJavaFest. Денис Макогон. 6 заблуждений относительно современной Java
JavaFest. Денис Макогон. 6 заблуждений относительно современной Java
 
JavaFest. Taras Boychuk. There is always a choice. Spring Data JDBC vs. Hiber...
JavaFest. Taras Boychuk. There is always a choice. Spring Data JDBC vs. Hiber...JavaFest. Taras Boychuk. There is always a choice. Spring Data JDBC vs. Hiber...
JavaFest. Taras Boychuk. There is always a choice. Spring Data JDBC vs. Hiber...
 
JavaFest. Вадим Казулькин. Projects Valhalla, Loom and GraalVM
JavaFest. Вадим Казулькин. Projects Valhalla, Loom and GraalVMJavaFest. Вадим Казулькин. Projects Valhalla, Loom and GraalVM
JavaFest. Вадим Казулькин. Projects Valhalla, Loom and GraalVM
 
JavaFest. Антон Лемешко. Model-Driven Development in the Open Java Universe
JavaFest. Антон Лемешко. Model-Driven Development in the Open Java UniverseJavaFest. Антон Лемешко. Model-Driven Development in the Open Java Universe
JavaFest. Антон Лемешко. Model-Driven Development in the Open Java Universe
 
JavaFest. Дмитрий Сергеев. Data processing with Kafka Streams and Spring Fram...
JavaFest. Дмитрий Сергеев. Data processing with Kafka Streams and Spring Fram...JavaFest. Дмитрий Сергеев. Data processing with Kafka Streams and Spring Fram...
JavaFest. Дмитрий Сергеев. Data processing with Kafka Streams and Spring Fram...
 
JavaFest. Nanne Baars. Web application security for developers
JavaFest. Nanne Baars. Web application security for developersJavaFest. Nanne Baars. Web application security for developers
JavaFest. Nanne Baars. Web application security for developers
 

Kürzlich hochgeladen

An Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfAn Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdf
SanaAli374401
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch Letter
MateoGardella
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
negromaestrong
 

Kürzlich hochgeladen (20)

An Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfAn Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdf
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch Letter
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 

JavaFest. Philipp Krenn. Scale Elasticsearch for Your Java Applications