Overview
The article details LinkedIn's migration journey from Java 8 to Java 11, emphasizing the performance improvements and challenges faced during the transition. It discusses preparation steps, performance testing results, and lessons learned throughout the migration process.
What You'll Learn
1
How to upgrade Java applications from Java 8 to Java 11
2
Why performance testing is crucial before migrating to a new Java version
3
How to automate the migration process for multiple repositories
4
When to use specific garbage collectors like G1, ZGC, and Shenandoah
Prerequisites & Requirements
- Understanding of Java and its garbage collection mechanisms
- Familiarity with Gradle build system(optional)
Key Questions Answered
What were the performance improvements after migrating to Java 11?
After migrating to Java 11, LinkedIn observed a decrease in P99 latency by an average of 10% and an increase in maximum throughput by an average of 20%. This was measured across 200+ applications, showcasing significant performance enhancements.
What challenges did LinkedIn face during the migration to Java 11?
LinkedIn encountered several challenges, including cross-compatibility issues between Java 8 and Java 11, removal of JavaEE libraries, and changes in JVM options. These challenges required careful planning and automation to address effectively.
How did LinkedIn automate the migration process?
LinkedIn automated the migration process by changing the build processes for over 2,000 repositories and triggering mass Java 11 builds in a test environment. This allowed them to identify issues early and streamline the migration workload.
What specific performance testing results were achieved with Java 11?
Performance testing with Java 11 showed that applications experienced performance gains of up to 200% in latency and throughput, particularly with the G1 garbage collector, confirming the anticipated benefits of the upgrade.
Key Statistics & Figures
Decrease in P99 latency
10%
Measured across 200+ applications after migrating to Java 11.
Increase in maximum throughput
20%
Observed post-migration across a sample of applications.
Performance gains in certain applications
up to 200%
Specifically noted with the G1 garbage collector during early adopter testing.
Number of applications migrated
1,100 applications
Targeted for migration during the planned three quarters.
Technologies & Tools
Some links below are affiliate links. We may earn a commission if you make a purchase.
Programming Language
Java
Used for building and running LinkedIn's applications.
Build Tool
Gradle
Upgraded to Gradle 5 or above for compatibility with Java 11.
Key Actionable Insights
1Implement a phased migration strategy to handle dependencies effectively.By using rough bucketing to split the migration into parts based on dependency levels, LinkedIn was able to maintain migration throughput while minimizing dependency-related blocks.
2Utilize automation tools to streamline the migration process.Automation significantly reduced the workload for migrating over 2,000 repositories, allowing for quicker identification of issues and smoother transitions.
3Conduct thorough performance testing before and after migration.Performance testing revealed critical insights into latency and throughput improvements, helping to validate the migration's success and guide future upgrades.
Common Pitfalls
1
Failing to address cross-compatibility issues between Java 8 and Java 11.
This can lead to runtime errors where code compiled in Java 8 does not run properly in Java 11 due to removed libraries and stricter class casting.
2
Neglecting the need for performance testing before and after migration.
Without performance testing, teams may overlook significant performance regressions or improvements, leading to unexpected application behavior post-migration.
Related Concepts
Java Garbage Collection Mechanisms
Microservices Architecture
Performance Optimization Techniques