from concept to clustered jac (jira.atlassian.com) - graham carrick

47
#atlassian

Upload: atlassian

Post on 28-May-2015

252 views

Category:

Software


1 download

DESCRIPTION

The development of clustered JIRA was a complex project spanning more than a year, and resulting in significant changes to core components of JIRA. We will discuss some of the changes made to Lucene index architecture, caching and scheduling, and the migration of jira.atlassian.com as the very first production clustered JIRA.

TRANSCRIPT

Page 1: From Concept to Clustered JAC (jira.atlassian.com) - Graham Carrick

#atlassian

Page 2: From Concept to Clustered JAC (jira.atlassian.com) - Graham Carrick

GRAHAM CARRICK • DEV MANAGER • ATLASSIAN • @GREM000

Clustering JIRAFrom concept to clustered JAC

Page 3: From Concept to Clustered JAC (jira.atlassian.com) - Graham Carrick

Concept - Massive teams

Page 4: From Concept to Clustered JAC (jira.atlassian.com) - Graham Carrick

Concept - Massive teams

Page 5: From Concept to Clustered JAC (jira.atlassian.com) - Graham Carrick

Concept - Massive teams

Page 6: From Concept to Clustered JAC (jira.atlassian.com) - Graham Carrick

“JIRA will never be clustered” - JIRA Architect

Page 7: From Concept to Clustered JAC (jira.atlassian.com) - Graham Carrick

Our Principles

!

•Keep it simple!

•Boy scout - leave the code better than you found it!

Page 8: From Concept to Clustered JAC (jira.atlassian.com) - Graham Carrick

Architecture

Page 9: From Concept to Clustered JAC (jira.atlassian.com) - Graham Carrick

• Complete index on each node

• Synced via DB queue• Poll every 5s

Lucene index

Page 10: From Concept to Clustered JAC (jira.atlassian.com) - Graham Carrick

• Complete index on each node

• Synced via DB queue• Poll every 5s

Lucene index

Page 11: From Concept to Clustered JAC (jira.atlassian.com) - Graham Carrick

• Complete index on each node

• Synced via DB queue• Poll every 5s

Lucene index

Page 12: From Concept to Clustered JAC (jira.atlassian.com) - Graham Carrick

• In memory caches• Use Ehcache• Distributed invalidation

pattern

Caches

Page 13: From Concept to Clustered JAC (jira.atlassian.com) - Graham Carrick

• In memory caches• Use Ehcache• Distributed invalidation

pattern

Caches

Page 14: From Concept to Clustered JAC (jira.atlassian.com) - Graham Carrick

• In memory caches• Use Ehcache• Distributed invalidation

pattern

Caches

Page 15: From Concept to Clustered JAC (jira.atlassian.com) - Graham Carrick

• Schedule on all nodes or once per cluster

Scheduler

Page 16: From Concept to Clustered JAC (jira.atlassian.com) - Graham Carrick

• Schedule on all nodes or once per cluster

Scheduler

Page 17: From Concept to Clustered JAC (jira.atlassian.com) - Graham Carrick

• Schedule on all nodes or once per cluster

Scheduler

Page 18: From Concept to Clustered JAC (jira.atlassian.com) - Graham Carrick

• Schedule on all nodes or once per cluster

Scheduler

Page 19: From Concept to Clustered JAC (jira.atlassian.com) - Graham Carrick

• Database backed lock• Used sparingly but

needed for cases like upgrade tasks

Locking

Page 20: From Concept to Clustered JAC (jira.atlassian.com) - Graham Carrick

• Database backed lock• Used sparingly but

needed for cases like upgrade tasks

Locking

Page 21: From Concept to Clustered JAC (jira.atlassian.com) - Graham Carrick

APIs

• Makes the code more future proof• Consistency of API cross product• Collaboration cross product• Plugins

- Make it possible and try to make it easy for them- Restricted architecture choices

Page 22: From Concept to Clustered JAC (jira.atlassian.com) - Graham Carrick

The hard work

141 Caches

Page 23: From Concept to Clustered JAC (jira.atlassian.com) - Graham Carrick

More hard work

15 Locks

Page 24: From Concept to Clustered JAC (jira.atlassian.com) - Graham Carrick

Even more hard work

200+ Synchronized blocks

Page 25: From Concept to Clustered JAC (jira.atlassian.com) - Graham Carrick

Then the plugins

80+ Plugins each with caches, scheduled jobs, locks and synchronized block

Page 26: From Concept to Clustered JAC (jira.atlassian.com) - Graham Carrick

But wait, there’s more

Complete rewrite of ranking algorithm in JIRA Agile

1

Page 27: From Concept to Clustered JAC (jira.atlassian.com) - Graham Carrick

Performance Testing

Page 28: From Concept to Clustered JAC (jira.atlassian.com) - Graham Carrick

Performance Testing

Page 29: From Concept to Clustered JAC (jira.atlassian.com) - Graham Carrick

Performance Testing

Page 30: From Concept to Clustered JAC (jira.atlassian.com) - Graham Carrick

Performance Testing

Page 31: From Concept to Clustered JAC (jira.atlassian.com) - Graham Carrick

Performance Testing

Page 32: From Concept to Clustered JAC (jira.atlassian.com) - Graham Carrick

Performance Testing

Page 33: From Concept to Clustered JAC (jira.atlassian.com) - Graham Carrick

Performance Testing

Page 34: From Concept to Clustered JAC (jira.atlassian.com) - Graham Carrick

Performance Testing

Page 35: From Concept to Clustered JAC (jira.atlassian.com) - Graham Carrick

Performance Testing

Page 36: From Concept to Clustered JAC (jira.atlassian.com) - Graham Carrick

Performance Testing

Page 37: From Concept to Clustered JAC (jira.atlassian.com) - Graham Carrick

Performance Testing

Page 38: From Concept to Clustered JAC (jira.atlassian.com) - Graham Carrick

Performance

Page 39: From Concept to Clustered JAC (jira.atlassian.com) - Graham Carrick

“Better than theoretically possible”

- Me

Page 40: From Concept to Clustered JAC (jira.atlassian.com) - Graham Carrick

Performance

Page 41: From Concept to Clustered JAC (jira.atlassian.com) - Graham Carrick

Dogfooding: jira.atlassian.com

Page 42: From Concept to Clustered JAC (jira.atlassian.com) - Graham Carrick

~200,000 users 270,000 issues

167 custom fields

~75,000 attachments68 workflows

~500,000 comments

139 projects

Dogfooding: jira.atlassian.com

Page 43: From Concept to Clustered JAC (jira.atlassian.com) - Graham Carrick

Monitoring

Page 44: From Concept to Clustered JAC (jira.atlassian.com) - Graham Carrick

Hardening: from Coal to Diamond

• User cache race• Invalidation vs. Eviction• Excessive locking

Page 45: From Concept to Clustered JAC (jira.atlassian.com) - Graham Carrick

“We can do hard things” - JIRA Team

Page 46: From Concept to Clustered JAC (jira.atlassian.com) - Graham Carrick

Questions?

Graham Carrick • Dev Manager • Atlassian • @Grem000

Ask live: bit.ly/ask-atlassian !

Log in with your email you used to register

Page 47: From Concept to Clustered JAC (jira.atlassian.com) - Graham Carrick

Thank you!

Graham Carrick • Dev Manager • Atlassian • @Grem000