SlideShare a Scribd company logo
1 of 67
Download to read offline
Scaling Indexing
and Replication in Jira DC Apps
ANDRIY YAKOVLEV | PRINCIPAL PREMIER SUPPORT ENGINEER | ATLASSIAN
DC Index replication
problems
Goals of this talk
DC ScaleInsight
Nodes are showing different
data for the same project and
the same board.
UNHAPPY JIRA DC USER
Agenda
Why is this important?
Overview of Jira Indexing
Index replication in Jira DC
When things break
Agenda
Why is this important?
Overview of Jira Indexing
Index replication in Jira DC
When things break
Datacenter
expectations
• Availability
• Stability (consistency)
• Performance
Premier
Support
• Partners
• Giving a hand
Application down or major
malfunction / Serious
degradation of application
performance or functionality
L1L2
Confusion
Multiple end users affected
and confused
Jira admin perception
Confidence
Loss of confidence or fear to
install App
Hours
Time spent on
troubleshooting
Agenda
Why is this important?
Overview of Jira Indexing
Index replication in Jira DC
When things break
Jira index
Jira index
Lucene
Text search engine which
keeps its structures on disk
JQL Search
Converts JQL into Lucene
query request, extendable,
pluggable.
Jira index
Lucene
Text search engine which
keeps its structures on disk
JQL Search
Converts JQL into Lucene
query request, extendable,
pluggable.
Jira index
Filters, Dashboards,
Agile boards
Using JQL as a building blocks
Lucene
Text search engine which
keeps its structures on disk
Jira index
Lucene
JQL Search
Filters, Dashboards,
Agile boards
SQL DB
How it works - Jira index
LUCENE
SQL
DOCS
DB
How it works - Jira index
LUCENE
SQL
JQL
DOCS
DB
How it works - Jira index
How it works - Jira index (2)
ISSUE
CF
COMMENT DOC
ISSUE DOCUMENT
How it works - Jira index (3)
How it works - Jira index (3)
How it works - Jira index (3)
How it works - Jira index (3)
CustomField.getValue()
How it works - Jira index (3)
CustomField.getValue()
STORE
INDEX
How it works - Jira index (3)
Global scope
Recomputing the value
CF is indexed
Cascading dependancies
Project scope
Storing values
No index for ViewOnly CF
TTL for cached values
FAST SLOW
Agenda
Why is this important?
Overview of Jira Indexing
Index replication in Jira DC
When things break
Jira index replication
Jira index replication
Multiserver
Each node has its own Lucene
copy
Replicating issues
Issue data is replicated by ID
and Action
Jira index replication
Multiserver
Each node has its own Lucene
copy
Replicating issues
Issue data is replicated by ID
and Action
Jira index replication
Eventually consistent
Each node replays the
replication in its own tempo
Multiserver
Each node has its own Lucene
copy
Everything is going to be
alright, maybe not today, but
eventually.
CONVENTIONAL WISDOM
How it works - DC replication
How it works - DC replication
1
How it works - DC replication
1
2
How it works - DC replication
1
2
How it works - DC replication (2)
1
2
3
1 2 3 12 23 2 2
How it works - DC replication (2)
1
2
3
1 2 3 12 23 2 2
How it works - DC replication (2)
1
2
3
1 2 3 12 23 2 2
DC index
replication
Replication
tables
Index counter
Nodes table
• replicatedindexoperation (RIO) - log entries of Luciene
update events
• nodeindexcounter - position of each node in RIO table
• clusternode - all nodes in cluster
•clusternodeheartbeat - cluster heartbeat table
Important tables for DC Index replication
RIO table
DC index
replication
ID 37821490
index_time 2019-08-09 03:30:17
node_id Node1
affected_index ISSUE
entity_type NONE
affected_ids 4500367
operation UPDATE_WITH_RELATED
filename
Replication
tables
Index counter
Nodes table
RIO table
DC index
replication
ID 37834110
index_time 2019-08-09 03:30:17
node_id Node2
affected_index ALL
entity_type NONE
affected_ids -
operation FULL_REINDEX_END
filename IndexSnapshot_10402.zip
Replication
tables
Index counter
Nodes table
RIO table (2)
DC index
replication
Replication
tables
Index counter
Nodes table
id | node_id | sending_node_id | index_operation_id
10400 | node1 | node2 | 37821490
10201 | node2 | node1 | 37822387
10203 | node2 | node2 | 37814476
10204 | node1 | node1 | 37814782
NodeIndexCounter
Each node keeps a record of the latest operation it processed
from RIO
RIO table
DC index
replication
Replication
tables
Index counter
Nodes table
RIO table
Node Status tables
Tracks the cluster status.
• clusternode - all nodes in cluster
node_id | node_state | ip | port | timestamp | node_build | version
node1 | ACTIVE | vm1.local | 40001| 1556186274874 | 71305 | 7.13.5
node2 | ACTIVE | vm2.local| 40001| 150366490664 | 71305 | 7.13.5
•clusternodeheartbeat - cluster heartbeat table
node_id | heartbeat_time | database_time
node2 | 1496015679597 | 1496015679597
node1 | 1496015687334 | 1496015687336
Global scope x Nodes
Recomputing the value x Nodes
CF is indexed x Nodes
Cascading dependancies x
Nodes
Project scope
Storing values
No index for ViewOnly CF
TTL for cached values
FAST SLOW
Agenda
Why is this important?
Overview of Jira Indexing
Index replication in Jira DC
When things break
When things
break
Slow indexing
Slow replication
JQL search not
consistent
Own replication
Unnecessary computations
• Global scope for App custom field
• Recomputing values for issues without modifications
Slow computations
• Cascading computations
• External calls to remote 3rd party systems
When things
break
Slow indexing
Slow replication
JQL search not
consistent
Best practice
• Project scope for App CF
• Storing values
• No index for ViewOnly CF
• Don’t abuse reindexing API
• Test on large data sets (App Performance Toolkit)
Own replication
Unnecessary computations
• Global scope for App custom field
• Recomputing values for issues without modifications
Slow computations
• Cascading computations
• External calls to remote 3rd party systems
When things
break
Slow indexing
Slow replication
JQL search not
consistent
JIRA DC scalability Lucene index test
Own replication
When things
break
Slow indexing
Slow replication
JQL search not
consistent
Node can’t keep up with index replication
• Includes slow indexing problems
• Write amplification due to large data sets
• Adding more nodes doesn’t help
Own replication
When things
break
Slow indexing
Slow replication
JQL search not
consistent
Node can’t keep up with index replication
• Includes slow indexing problems
• Write amplification due to large data sets
• Adding more nodes doesn’t help
Own replication
Best practice
• Store values
• Test with 3+ nodes
• Measure and test indexing time, report CF indexing
slowness to the Jira admin
There are only two hard things
in Computer Science: cache
invalidation and naming
things..
PHIL KARLTON
When things
break
Slow indexing
Slow replication
JQL search not
consistent
Lucene data is not consistent
• Nodes collect the value at different time
• Recomputing in different context
• Stale cache
• Errors in reindexing
Own replication
Leaking Lucene searcher
Avoid using ThreadLocalSearcherCache#startSearcherContext
without cleaning the ThreadLocals
When things
break
Slow indexing
Slow replication
JQL search not
consistent
Creating your own replication
When issue and CF are not enough
• Use cache to short lived copy values
• Use DB to store values and pass the reference
• Possibly own Lucene index
• Create your own replication Q
• Don’t use cache if consistency is important
• Avoid using ClusterMessage for heavy traffic
•Monitoring and health check
Own replication
When things
break
Shape usage
Please only use circles, rectangles, and
rounded rectangles to call attention to a
particular part of a screenshot, for the
sake of consistency.
Knowledge • Jira Data Center Troubleshooting
• Index Replication Jira Data Center Troubleshooting
•Keeping Lucene Index Synchronised in JIRA Data
Center
•HealthCheck: Cluster Index Replication
Takeaways
DC Index replication
problems
App CF can slow down index
operations
To recap
DC Scale
Use proper config and test for
data large sets
Insight
How Jira DC indexing works
DC Index replication
problems
App CF can slow down index
operations
To recap
DC Scale
Use proper config and test for
data large sets
Insight
How Jira DC indexing works
DC Index replication
problems
App CF can slow down index
operations
To recap
DC Scale
Use proper config and test for
data large sets
Insight
How Jira DC indexing works
DC Index replication
problems
App CF can slow down index
operations
To recap
DC Scale
Use proper config and test for
data large sets
Insight
How Jira DC indexing works
Q & A
Shape usage
Please only use circles, rectangles, and
rounded rectangles to call attention to a
particular part of a screenshot, for the
sake of consistency.
Knowledge • Jira Data Center Troubleshooting
• Index Replication Jira Data Center Troubleshooting
•Keeping Lucene Index Synchronised in JIRA Data
Center
•HealthCheck: Cluster Index Replication
Thank you!
ANDRIY YAKOVLEV | PRINCIPAL PREMIER SUPPORT ENGINEER | ATLASSIAN

More Related Content

What's hot

Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
Christalin Nelson
 
ITIL Artifacts
ITIL ArtifactsITIL Artifacts
ITIL Artifacts
rtbyrnes
 
Christo kutrovsky oracle, memory & linux
Christo kutrovsky   oracle, memory & linuxChristo kutrovsky   oracle, memory & linux
Christo kutrovsky oracle, memory & linux
Kyle Hailey
 

What's hot (20)

SSD Deployment Strategies for MySQL
SSD Deployment Strategies for MySQLSSD Deployment Strategies for MySQL
SSD Deployment Strategies for MySQL
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
Maxscale_메뉴얼
Maxscale_메뉴얼Maxscale_메뉴얼
Maxscale_메뉴얼
 
Ten Things You Should not Forget in Mainframe Security
Ten Things You Should not Forget in Mainframe Security Ten Things You Should not Forget in Mainframe Security
Ten Things You Should not Forget in Mainframe Security
 
Main Components Of Database Management Systems.pptx
Main Components Of Database Management Systems.pptxMain Components Of Database Management Systems.pptx
Main Components Of Database Management Systems.pptx
 
Galera cluster for high availability
Galera cluster for high availability Galera cluster for high availability
Galera cluster for high availability
 
Oracle Data Redaction
Oracle Data RedactionOracle Data Redaction
Oracle Data Redaction
 
Load Balancing MySQL with HAProxy - Slides
Load Balancing MySQL with HAProxy - SlidesLoad Balancing MySQL with HAProxy - Slides
Load Balancing MySQL with HAProxy - Slides
 
Basic oracle-database-administration
Basic oracle-database-administrationBasic oracle-database-administration
Basic oracle-database-administration
 
Data administration
Data administrationData administration
Data administration
 
Overview of Databases and Data Modelling-1.pdf
Overview of Databases and Data Modelling-1.pdfOverview of Databases and Data Modelling-1.pdf
Overview of Databases and Data Modelling-1.pdf
 
Getting started with postgresql
Getting started with postgresqlGetting started with postgresql
Getting started with postgresql
 
ITIL Artifacts
ITIL ArtifactsITIL Artifacts
ITIL Artifacts
 
Oracle Active Data Guard 12c: Far Sync Instance, Real-Time Cascade and Other ...
Oracle Active Data Guard 12c: Far Sync Instance, Real-Time Cascade and Other ...Oracle Active Data Guard 12c: Far Sync Instance, Real-Time Cascade and Other ...
Oracle Active Data Guard 12c: Far Sync Instance, Real-Time Cascade and Other ...
 
ITIL v3 Problem Management
ITIL v3 Problem ManagementITIL v3 Problem Management
ITIL v3 Problem Management
 
ITIL & ITSM Guide and Overview
ITIL & ITSM Guide and OverviewITIL & ITSM Guide and Overview
ITIL & ITSM Guide and Overview
 
Avaali Solutions - Sap archiving and document access by open text
Avaali Solutions - Sap archiving and document access by open textAvaali Solutions - Sap archiving and document access by open text
Avaali Solutions - Sap archiving and document access by open text
 
Optimizing RocksDB for Open-Channel SSDs
Optimizing RocksDB for Open-Channel SSDsOptimizing RocksDB for Open-Channel SSDs
Optimizing RocksDB for Open-Channel SSDs
 
Christo kutrovsky oracle, memory & linux
Christo kutrovsky   oracle, memory & linuxChristo kutrovsky   oracle, memory & linux
Christo kutrovsky oracle, memory & linux
 
Example business continuity plan
Example business continuity planExample business continuity plan
Example business continuity plan
 

Similar to Scaling Indexing and Replication in Jira Data Center Apps

Automated Cluster Management and Recovery for Large Scale Multi-Tenant Sea...
  Automated Cluster Management and Recovery  for Large Scale Multi-Tenant Sea...  Automated Cluster Management and Recovery  for Large Scale Multi-Tenant Sea...
Automated Cluster Management and Recovery for Large Scale Multi-Tenant Sea...
Lucidworks
 
Building a highly scalable and available cloud application
Building a highly scalable and available cloud applicationBuilding a highly scalable and available cloud application
Building a highly scalable and available cloud application
Noam Sheffer
 

Similar to Scaling Indexing and Replication in Jira Data Center Apps (20)

Bloomreach - BloomStore Compute Cloud Infrastructure
Bloomreach - BloomStore Compute Cloud Infrastructure Bloomreach - BloomStore Compute Cloud Infrastructure
Bloomreach - BloomStore Compute Cloud Infrastructure
 
Building Apps with Distributed In-Memory Computing Using Apache Geode
Building Apps with Distributed In-Memory Computing Using Apache GeodeBuilding Apps with Distributed In-Memory Computing Using Apache Geode
Building Apps with Distributed In-Memory Computing Using Apache Geode
 
Automated Cluster Management and Recovery for Large Scale Multi-Tenant Sea...
  Automated Cluster Management and Recovery  for Large Scale Multi-Tenant Sea...  Automated Cluster Management and Recovery  for Large Scale Multi-Tenant Sea...
Automated Cluster Management and Recovery for Large Scale Multi-Tenant Sea...
 
Apache Kylin: OLAP Engine on Hadoop - Tech Deep Dive
Apache Kylin: OLAP Engine on Hadoop - Tech Deep DiveApache Kylin: OLAP Engine on Hadoop - Tech Deep Dive
Apache Kylin: OLAP Engine on Hadoop - Tech Deep Dive
 
SQL To NoSQL - Top 6 Questions Before Making The Move
SQL To NoSQL - Top 6 Questions Before Making The MoveSQL To NoSQL - Top 6 Questions Before Making The Move
SQL To NoSQL - Top 6 Questions Before Making The Move
 
Deep Dive into Spark SQL with Advanced Performance Tuning with Xiao Li & Wenc...
Deep Dive into Spark SQL with Advanced Performance Tuning with Xiao Li & Wenc...Deep Dive into Spark SQL with Advanced Performance Tuning with Xiao Li & Wenc...
Deep Dive into Spark SQL with Advanced Performance Tuning with Xiao Li & Wenc...
 
Oracle Database Performance Tuning Advanced Features and Best Practices for DBAs
Oracle Database Performance Tuning Advanced Features and Best Practices for DBAsOracle Database Performance Tuning Advanced Features and Best Practices for DBAs
Oracle Database Performance Tuning Advanced Features and Best Practices for DBAs
 
MongoDB Operations for Developers
MongoDB Operations for DevelopersMongoDB Operations for Developers
MongoDB Operations for Developers
 
Ops Jumpstart: MongoDB Administration 101
Ops Jumpstart: MongoDB Administration 101Ops Jumpstart: MongoDB Administration 101
Ops Jumpstart: MongoDB Administration 101
 
Daniel Ridder ABAP Core Data Services No Pain, No Gain
Daniel Ridder ABAP Core Data Services No Pain, No GainDaniel Ridder ABAP Core Data Services No Pain, No Gain
Daniel Ridder ABAP Core Data Services No Pain, No Gain
 
Db trends final
Db trends   finalDb trends   final
Db trends final
 
Software Architecture and Architectors: useless VS valuable
Software Architecture and Architectors: useless VS valuableSoftware Architecture and Architectors: useless VS valuable
Software Architecture and Architectors: useless VS valuable
 
#GeodeSummit - Where Does Geode Fit in Modern System Architectures
#GeodeSummit - Where Does Geode Fit in Modern System Architectures#GeodeSummit - Where Does Geode Fit in Modern System Architectures
#GeodeSummit - Where Does Geode Fit in Modern System Architectures
 
Reaching State Zero Without Losing Your Versions
Reaching State Zero Without Losing Your VersionsReaching State Zero Without Losing Your Versions
Reaching State Zero Without Losing Your Versions
 
Building a highly scalable and available cloud application
Building a highly scalable and available cloud applicationBuilding a highly scalable and available cloud application
Building a highly scalable and available cloud application
 
Fabian Hueske - Taking a look under the hood of Apache Flink’s relational APIs
Fabian Hueske - Taking a look under the hood of Apache Flink’s relational APIsFabian Hueske - Taking a look under the hood of Apache Flink’s relational APIs
Fabian Hueske - Taking a look under the hood of Apache Flink’s relational APIs
 
Taking a look under the hood of Apache Flink's relational APIs.
Taking a look under the hood of Apache Flink's relational APIs.Taking a look under the hood of Apache Flink's relational APIs.
Taking a look under the hood of Apache Flink's relational APIs.
 
Building cloud native data microservice
Building cloud native data microserviceBuilding cloud native data microservice
Building cloud native data microservice
 
Glint with Apache Spark
Glint with Apache SparkGlint with Apache Spark
Glint with Apache Spark
 
Add Redis to Postgres to Make Your Microservices Go Boom!
Add Redis to Postgres to Make Your Microservices Go Boom!Add Redis to Postgres to Make Your Microservices Go Boom!
Add Redis to Postgres to Make Your Microservices Go Boom!
 

More from Atlassian

Design Your Next App with the Atlassian Vendor Sketch Plugin
Design Your Next App with the Atlassian Vendor Sketch PluginDesign Your Next App with the Atlassian Vendor Sketch Plugin
Design Your Next App with the Atlassian Vendor Sketch Plugin
Atlassian
 

More from Atlassian (20)

International Women's Day 2020
International Women's Day 2020International Women's Day 2020
International Women's Day 2020
 
10 emerging trends that will unbreak your workplace in 2020
10 emerging trends that will unbreak your workplace in 202010 emerging trends that will unbreak your workplace in 2020
10 emerging trends that will unbreak your workplace in 2020
 
Forge App Showcase
Forge App ShowcaseForge App Showcase
Forge App Showcase
 
Let's Build an Editor Macro with Forge UI
Let's Build an Editor Macro with Forge UILet's Build an Editor Macro with Forge UI
Let's Build an Editor Macro with Forge UI
 
Meet the Forge Runtime
Meet the Forge RuntimeMeet the Forge Runtime
Meet the Forge Runtime
 
Forge UI: A New Way to Customize the Atlassian User Experience
Forge UI: A New Way to Customize the Atlassian User ExperienceForge UI: A New Way to Customize the Atlassian User Experience
Forge UI: A New Way to Customize the Atlassian User Experience
 
Take Action with Forge Triggers
Take Action with Forge TriggersTake Action with Forge Triggers
Take Action with Forge Triggers
 
Observability and Troubleshooting in Forge
Observability and Troubleshooting in ForgeObservability and Troubleshooting in Forge
Observability and Troubleshooting in Forge
 
Trusted by Default: The Forge Security & Privacy Model
Trusted by Default: The Forge Security & Privacy ModelTrusted by Default: The Forge Security & Privacy Model
Trusted by Default: The Forge Security & Privacy Model
 
Designing Forge UI: A Story of Designing an App UI System
Designing Forge UI: A Story of Designing an App UI SystemDesigning Forge UI: A Story of Designing an App UI System
Designing Forge UI: A Story of Designing an App UI System
 
Forge: Under the Hood
Forge: Under the HoodForge: Under the Hood
Forge: Under the Hood
 
Access to User Activities - Activity Platform APIs
Access to User Activities - Activity Platform APIsAccess to User Activities - Activity Platform APIs
Access to User Activities - Activity Platform APIs
 
Design Your Next App with the Atlassian Vendor Sketch Plugin
Design Your Next App with the Atlassian Vendor Sketch PluginDesign Your Next App with the Atlassian Vendor Sketch Plugin
Design Your Next App with the Atlassian Vendor Sketch Plugin
 
Tear Up Your Roadmap and Get Out of the Building
Tear Up Your Roadmap and Get Out of the BuildingTear Up Your Roadmap and Get Out of the Building
Tear Up Your Roadmap and Get Out of the Building
 
Nailing Measurement: a Framework for Measuring Metrics that Matter
Nailing Measurement: a Framework for Measuring Metrics that MatterNailing Measurement: a Framework for Measuring Metrics that Matter
Nailing Measurement: a Framework for Measuring Metrics that Matter
 
Building Apps With Color Blind Users in Mind
Building Apps With Color Blind Users in MindBuilding Apps With Color Blind Users in Mind
Building Apps With Color Blind Users in Mind
 
Creating Inclusive Experiences: Balancing Personality and Accessibility in UX...
Creating Inclusive Experiences: Balancing Personality and Accessibility in UX...Creating Inclusive Experiences: Balancing Personality and Accessibility in UX...
Creating Inclusive Experiences: Balancing Personality and Accessibility in UX...
 
Beyond Diversity: A Guide to Building Balanced Teams
Beyond Diversity: A Guide to Building Balanced TeamsBeyond Diversity: A Guide to Building Balanced Teams
Beyond Diversity: A Guide to Building Balanced Teams
 
The Road(map) to Las Vegas - The Story of an Emerging Self-Managed Team
The Road(map) to Las Vegas - The Story of an Emerging Self-Managed TeamThe Road(map) to Las Vegas - The Story of an Emerging Self-Managed Team
The Road(map) to Las Vegas - The Story of an Emerging Self-Managed Team
 
Building Apps With Enterprise in Mind
Building Apps With Enterprise in MindBuilding Apps With Enterprise in Mind
Building Apps With Enterprise in Mind
 

Recently uploaded

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Recently uploaded (20)

ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 

Scaling Indexing and Replication in Jira Data Center Apps

  • 1. Scaling Indexing and Replication in Jira DC Apps ANDRIY YAKOVLEV | PRINCIPAL PREMIER SUPPORT ENGINEER | ATLASSIAN
  • 2. DC Index replication problems Goals of this talk DC ScaleInsight
  • 3. Nodes are showing different data for the same project and the same board. UNHAPPY JIRA DC USER
  • 4.
  • 5. Agenda Why is this important? Overview of Jira Indexing Index replication in Jira DC When things break
  • 6. Agenda Why is this important? Overview of Jira Indexing Index replication in Jira DC When things break
  • 9. Application down or major malfunction / Serious degradation of application performance or functionality L1L2
  • 10. Confusion Multiple end users affected and confused Jira admin perception Confidence Loss of confidence or fear to install App Hours Time spent on troubleshooting
  • 11. Agenda Why is this important? Overview of Jira Indexing Index replication in Jira DC When things break
  • 12.
  • 13.
  • 15. Jira index Lucene Text search engine which keeps its structures on disk
  • 16. JQL Search Converts JQL into Lucene query request, extendable, pluggable. Jira index Lucene Text search engine which keeps its structures on disk
  • 17. JQL Search Converts JQL into Lucene query request, extendable, pluggable. Jira index Filters, Dashboards, Agile boards Using JQL as a building blocks Lucene Text search engine which keeps its structures on disk
  • 18. Jira index Lucene JQL Search Filters, Dashboards, Agile boards
  • 19. SQL DB How it works - Jira index
  • 22. How it works - Jira index (2) ISSUE CF COMMENT DOC ISSUE DOCUMENT
  • 23. How it works - Jira index (3)
  • 24. How it works - Jira index (3)
  • 25. How it works - Jira index (3)
  • 26. How it works - Jira index (3)
  • 29. Global scope Recomputing the value CF is indexed Cascading dependancies Project scope Storing values No index for ViewOnly CF TTL for cached values FAST SLOW
  • 30. Agenda Why is this important? Overview of Jira Indexing Index replication in Jira DC When things break
  • 32. Jira index replication Multiserver Each node has its own Lucene copy
  • 33. Replicating issues Issue data is replicated by ID and Action Jira index replication Multiserver Each node has its own Lucene copy
  • 34. Replicating issues Issue data is replicated by ID and Action Jira index replication Eventually consistent Each node replays the replication in its own tempo Multiserver Each node has its own Lucene copy
  • 35. Everything is going to be alright, maybe not today, but eventually. CONVENTIONAL WISDOM
  • 36.
  • 37. How it works - DC replication
  • 38. How it works - DC replication 1
  • 39. How it works - DC replication 1 2
  • 40. How it works - DC replication 1 2
  • 41. How it works - DC replication (2) 1 2 3 1 2 3 12 23 2 2
  • 42. How it works - DC replication (2) 1 2 3 1 2 3 12 23 2 2
  • 43. How it works - DC replication (2) 1 2 3 1 2 3 12 23 2 2
  • 44. DC index replication Replication tables Index counter Nodes table • replicatedindexoperation (RIO) - log entries of Luciene update events • nodeindexcounter - position of each node in RIO table • clusternode - all nodes in cluster •clusternodeheartbeat - cluster heartbeat table Important tables for DC Index replication RIO table
  • 45. DC index replication ID 37821490 index_time 2019-08-09 03:30:17 node_id Node1 affected_index ISSUE entity_type NONE affected_ids 4500367 operation UPDATE_WITH_RELATED filename Replication tables Index counter Nodes table RIO table
  • 46. DC index replication ID 37834110 index_time 2019-08-09 03:30:17 node_id Node2 affected_index ALL entity_type NONE affected_ids - operation FULL_REINDEX_END filename IndexSnapshot_10402.zip Replication tables Index counter Nodes table RIO table (2)
  • 47. DC index replication Replication tables Index counter Nodes table id | node_id | sending_node_id | index_operation_id 10400 | node1 | node2 | 37821490 10201 | node2 | node1 | 37822387 10203 | node2 | node2 | 37814476 10204 | node1 | node1 | 37814782 NodeIndexCounter Each node keeps a record of the latest operation it processed from RIO RIO table
  • 48. DC index replication Replication tables Index counter Nodes table RIO table Node Status tables Tracks the cluster status. • clusternode - all nodes in cluster node_id | node_state | ip | port | timestamp | node_build | version node1 | ACTIVE | vm1.local | 40001| 1556186274874 | 71305 | 7.13.5 node2 | ACTIVE | vm2.local| 40001| 150366490664 | 71305 | 7.13.5 •clusternodeheartbeat - cluster heartbeat table node_id | heartbeat_time | database_time node2 | 1496015679597 | 1496015679597 node1 | 1496015687334 | 1496015687336
  • 49. Global scope x Nodes Recomputing the value x Nodes CF is indexed x Nodes Cascading dependancies x Nodes Project scope Storing values No index for ViewOnly CF TTL for cached values FAST SLOW
  • 50. Agenda Why is this important? Overview of Jira Indexing Index replication in Jira DC When things break
  • 51. When things break Slow indexing Slow replication JQL search not consistent Own replication Unnecessary computations • Global scope for App custom field • Recomputing values for issues without modifications Slow computations • Cascading computations • External calls to remote 3rd party systems
  • 52. When things break Slow indexing Slow replication JQL search not consistent Best practice • Project scope for App CF • Storing values • No index for ViewOnly CF • Don’t abuse reindexing API • Test on large data sets (App Performance Toolkit) Own replication Unnecessary computations • Global scope for App custom field • Recomputing values for issues without modifications Slow computations • Cascading computations • External calls to remote 3rd party systems
  • 53. When things break Slow indexing Slow replication JQL search not consistent JIRA DC scalability Lucene index test Own replication
  • 54. When things break Slow indexing Slow replication JQL search not consistent Node can’t keep up with index replication • Includes slow indexing problems • Write amplification due to large data sets • Adding more nodes doesn’t help Own replication
  • 55. When things break Slow indexing Slow replication JQL search not consistent Node can’t keep up with index replication • Includes slow indexing problems • Write amplification due to large data sets • Adding more nodes doesn’t help Own replication Best practice • Store values • Test with 3+ nodes • Measure and test indexing time, report CF indexing slowness to the Jira admin
  • 56. There are only two hard things in Computer Science: cache invalidation and naming things.. PHIL KARLTON
  • 57. When things break Slow indexing Slow replication JQL search not consistent Lucene data is not consistent • Nodes collect the value at different time • Recomputing in different context • Stale cache • Errors in reindexing Own replication Leaking Lucene searcher Avoid using ThreadLocalSearcherCache#startSearcherContext without cleaning the ThreadLocals
  • 58. When things break Slow indexing Slow replication JQL search not consistent Creating your own replication When issue and CF are not enough • Use cache to short lived copy values • Use DB to store values and pass the reference • Possibly own Lucene index • Create your own replication Q • Don’t use cache if consistency is important • Avoid using ClusterMessage for heavy traffic •Monitoring and health check Own replication
  • 59. When things break Shape usage Please only use circles, rectangles, and rounded rectangles to call attention to a particular part of a screenshot, for the sake of consistency. Knowledge • Jira Data Center Troubleshooting • Index Replication Jira Data Center Troubleshooting •Keeping Lucene Index Synchronised in JIRA Data Center •HealthCheck: Cluster Index Replication
  • 61. DC Index replication problems App CF can slow down index operations To recap DC Scale Use proper config and test for data large sets Insight How Jira DC indexing works
  • 62. DC Index replication problems App CF can slow down index operations To recap DC Scale Use proper config and test for data large sets Insight How Jira DC indexing works
  • 63. DC Index replication problems App CF can slow down index operations To recap DC Scale Use proper config and test for data large sets Insight How Jira DC indexing works
  • 64. DC Index replication problems App CF can slow down index operations To recap DC Scale Use proper config and test for data large sets Insight How Jira DC indexing works
  • 65.
  • 66. Q & A Shape usage Please only use circles, rectangles, and rounded rectangles to call attention to a particular part of a screenshot, for the sake of consistency. Knowledge • Jira Data Center Troubleshooting • Index Replication Jira Data Center Troubleshooting •Keeping Lucene Index Synchronised in JIRA Data Center •HealthCheck: Cluster Index Replication
  • 67. Thank you! ANDRIY YAKOVLEV | PRINCIPAL PREMIER SUPPORT ENGINEER | ATLASSIAN