SlideShare a Scribd company logo
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
Scaling Indexing and Replication in Jira Data Center Apps
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
Scaling Indexing and Replication in Jira Data Center Apps
Scaling Indexing and Replication in Jira Data Center Apps
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
Scaling Indexing and Replication in Jira Data Center Apps
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
Scaling Indexing and Replication in Jira Data Center Apps
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 (13)

PDF
Introduction DNSSec
AFRINIC
 
PDF
DevOps Real-Time Projects | Edureka
Edureka!
 
PPTX
Domain name system
Siddharth Chandel
 
PPTX
Jabes 2021 - Session parallèle "Mécanique des alignements d'identifiants aute...
ABES
 
PDF
Brkaci 1002
ccherel
 
PPTX
Emc vnx2 technical deep dive workshop
solarisyougood
 
PPTX
Microsoft Active Directory.pptx
masbulosoke
 
PPTX
CCNA (R & S) Module 03 - Routing & Switching Essentials - Chapter 10
Waqas Ahmed Nawaz
 
PPTX
Fsmo roles
Chinmoy Jena
 
PPT
Domain name server
Mobile88
 
PPTX
Exchange Server 2013 Architecture Deep Dive, Part 2
Microsoft TechNet - Belgium and Luxembourg
 
PDF
Ccnp presentation day 4 sd-access vs traditional network architecture
SagarR24
 
Introduction DNSSec
AFRINIC
 
DevOps Real-Time Projects | Edureka
Edureka!
 
Domain name system
Siddharth Chandel
 
Jabes 2021 - Session parallèle "Mécanique des alignements d'identifiants aute...
ABES
 
Brkaci 1002
ccherel
 
Emc vnx2 technical deep dive workshop
solarisyougood
 
Microsoft Active Directory.pptx
masbulosoke
 
CCNA (R & S) Module 03 - Routing & Switching Essentials - Chapter 10
Waqas Ahmed Nawaz
 
Fsmo roles
Chinmoy Jena
 
Domain name server
Mobile88
 
Exchange Server 2013 Architecture Deep Dive, Part 2
Microsoft TechNet - Belgium and Luxembourg
 
Ccnp presentation day 4 sd-access vs traditional network architecture
SagarR24
 

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

PPTX
Bloomreach - BloomStore Compute Cloud Infrastructure
bloomreacheng
 
PDF
Building Apps with Distributed In-Memory Computing Using Apache Geode
PivotalOpenSourceHub
 
PDF
Automated Cluster Management and Recovery for Large Scale Multi-Tenant Sea...
Lucidworks
 
PDF
Apache Kylin: OLAP Engine on Hadoop - Tech Deep Dive
Xu Jiang
 
PPTX
SQL To NoSQL - Top 6 Questions Before Making The Move
IBM Cloud Data Services
 
PDF
Deep Dive into Spark SQL with Advanced Performance Tuning with Xiao Li & Wenc...
Databricks
 
PDF
Oracle Database Performance Tuning Advanced Features and Best Practices for DBAs
Zohar Elkayam
 
PPTX
Ops Jumpstart: MongoDB Administration 101
MongoDB
 
PPTX
MongoDB Operations for Developers
MongoDB
 
PDF
Daniel Ridder ABAP Core Data Services No Pain, No Gain
Daniel Ridder
 
PPT
Db trends final
Craig Mullins
 
PDF
Software Architecture and Architectors: useless VS valuable
Comsysto Reply GmbH
 
PDF
#GeodeSummit - Where Does Geode Fit in Modern System Architectures
PivotalOpenSourceHub
 
PPTX
Reaching State Zero Without Losing Your Versions
SSP Innovations
 
PPTX
Building a highly scalable and available cloud application
Noam Sheffer
 
PPTX
Taking a look under the hood of Apache Flink's relational APIs.
Fabian Hueske
 
PPTX
Fabian Hueske - Taking a look under the hood of Apache Flink’s relational APIs
Flink Forward
 
PPTX
Building cloud native data microservice
Nilanjan Roy
 
PPTX
Glint with Apache Spark
Venkata Naga Ravi
 
PPTX
Add Redis to Postgres to Make Your Microservices Go Boom!
Dave Nielsen
 
Bloomreach - BloomStore Compute Cloud Infrastructure
bloomreacheng
 
Building Apps with Distributed In-Memory Computing Using Apache Geode
PivotalOpenSourceHub
 
Automated Cluster Management and Recovery for Large Scale Multi-Tenant Sea...
Lucidworks
 
Apache Kylin: OLAP Engine on Hadoop - Tech Deep Dive
Xu Jiang
 
SQL To NoSQL - Top 6 Questions Before Making The Move
IBM Cloud Data Services
 
Deep Dive into Spark SQL with Advanced Performance Tuning with Xiao Li & Wenc...
Databricks
 
Oracle Database Performance Tuning Advanced Features and Best Practices for DBAs
Zohar Elkayam
 
Ops Jumpstart: MongoDB Administration 101
MongoDB
 
MongoDB Operations for Developers
MongoDB
 
Daniel Ridder ABAP Core Data Services No Pain, No Gain
Daniel Ridder
 
Db trends final
Craig Mullins
 
Software Architecture and Architectors: useless VS valuable
Comsysto Reply GmbH
 
#GeodeSummit - Where Does Geode Fit in Modern System Architectures
PivotalOpenSourceHub
 
Reaching State Zero Without Losing Your Versions
SSP Innovations
 
Building a highly scalable and available cloud application
Noam Sheffer
 
Taking a look under the hood of Apache Flink's relational APIs.
Fabian Hueske
 
Fabian Hueske - Taking a look under the hood of Apache Flink’s relational APIs
Flink Forward
 
Building cloud native data microservice
Nilanjan Roy
 
Glint with Apache Spark
Venkata Naga Ravi
 
Add Redis to Postgres to Make Your Microservices Go Boom!
Dave Nielsen
 
Ad

More from Atlassian (20)

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

Recently uploaded (20)

PDF
From Code to Challenge: Crafting Skill-Based Games That Engage and Reward
aiyshauae
 
PDF
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
PDF
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
PDF
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
PDF
What Makes Contify’s News API Stand Out: Key Features at a Glance
Contify
 
PDF
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
PDF
Biography of Daniel Podor.pdf
Daniel Podor
 
PDF
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
PDF
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
PDF
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
PDF
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
PDF
IoT-Powered Industrial Transformation – Smart Manufacturing to Connected Heal...
Rejig Digital
 
PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
PDF
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
From Code to Challenge: Crafting Skill-Based Games That Engage and Reward
aiyshauae
 
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
What Makes Contify’s News API Stand Out: Key Features at a Glance
Contify
 
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
Biography of Daniel Podor.pdf
Daniel Podor
 
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
IoT-Powered Industrial Transformation – Smart Manufacturing to Connected Heal...
Rejig Digital
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 

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
  • 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
  • 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
  • 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
  • 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