What’s New in Java. Leveraging Java in Hybrid Cloud Val Chibisov, Senior Product Manager
What’s New in Java. Leveraging Java in Hybrid Cloud Val Chibisov, Senior Product Manager
Agenda
1. What’s new in Java? Java 8 – Memory Model 2. JVM-based Languages 3. Hybrid Cloud 4. Microservice Refactoring
Copyright © 2015 AppDynamics. All rights reserved. 2
JAVA 8 – MEMORY MODEL
Java 7 – Recap – Java Memory Model
Copyright © 2015 AppDynamics. All rights reserved. 4
Eden Survivor Survivor
Old Gen
Perm Gen
Heap -Xmx
Native Memory
Java 8 – Recap – Java Memory Model
Copyright © 2015 AppDynamics. All rights reserved. 5
Eden Survivor Survivor
Old Gen
Heap -Xmx
Native Memory
Metaspace
Java 8 – PermGen Issues
• PermGen necessary size is hard to predict – Results in either under-provisioning or over-provisioning
• GC performance improvements
• Support for advanced optimizations – G1 concurrent class unloading
Copyright © 2015 AppDynamics. All rights reserved. 6
Java 8 – Metaspace Changes
• PermGen – Memory space is gone
• Metaspace memory allocation model – Most class metadata is now allocated out of native memory – No more classes which are used to describe class metadata
• Metaspace capacity – Out of the box available allocation space is limited by the amount of available native
memory – Dynamically resizes depending on the allocation demand at runtime – Possible to use a flag (-XX:MaxMetaspaceSize=Y) in order to limit the amount of
native memory used for class metadata
Copyright © 2015 AppDynamics. All rights reserved. 7
Java 8 – Metaspace Changes Ctd
• Metaspace garbage collection – Garbage collection is triggered once the class metadata usage reaches the MaxMetaspaceSize – Excessive Metaspace GCs may point to:
• Memory leaks of classes • Memory leaks of classloaders • Improper allocation sizing
– Metaspace tuning and monitoring is highly important to limit the frequency/delay of these GCs
• Java heap space impact – There may be some increase of Java heap due to various data being moved to Java heap space
• Metaspace monitoring – Hotspot 1.8 GC logs provide Metaspace usage – AppDynamics!
Copyright © 2015 AppDynamics. All rights reserved. 8
Java 8 – Metaspace – Magic Bullet?
• Magic Bullet? – Not quite – Memory caveats still remain
• Requires proper monitoring and proactive remediation – Class metadata memory footprint – Class memory leaks – Class loader memory leaks
Copyright © 2015 AppDynamics. All rights reserved. 9
AppDynamics – Passive Metaspace Monitoring
Copyright © 2015 AppDynamics. All rights reserved. 10
AppDynamics – Proactive Metaspace Monitoring
Copyright © 2015 AppDynamics. All rights reserved. 11
JVM-BASED LANGUAGES & APPDYNAMICS
Scala
Copyright © 2015 AppDynamics. All rights reserved. 13
• JVM-based flexible programming language
• Rising in popularity due to its extremely flexible functional-object-oriented approach and Java interoperability
Groovy
Copyright © 2015 AppDynamics. All rights reserved. 14
• Dynamic JVM-based object-oriented programming language
• Best trait: simplicity, dynamic language
• Superset of Java – easier to adopt
JRuby
Copyright © 2015 AppDynamics. All rights reserved. 15
• JVM-based programming language
• Full access to Java toolchain
• Real system threads
JVM-based Language Stack Monitoring
Copyright © 2015 AppDynamics. All rights reserved. 16
• AppDynamics enables deep monitoring and troubleshooting of JVM-based languages!
• Proactive alerts
• Distributed cross-stack environment monitoring!
HYBRID CLOUD & APPDYNAMICS
Public Cloud
Copyright © 2015 AppDynamics. All rights reserved. 18
• Mutlitenant environment
• You own a slice of a server in a cloud environment shared by other clients
• Generally used for web servers or dev systems
Public
Public Cloud – Trade-Offs
Copyright © 2015 AppDynamics. All rights reserved. 19
• Hardware Sharing – Meeting compliance requirements is near to impossible in a public cloud
• Scalability – On-demand resource availability
• Location independence – Use computing resources local to clients/users Public
Private Cloud
Copyright © 2015 AppDynamics. All rights reserved. 20
• “Single-tenant” environment dedicated to a single entity such as a client or company
• Expanding on traditional enterprise datacenters
Private
Private Cloud – Trade-Offs
Copyright © 2015 AppDynamics. All rights reserved. 21
• Security – Cloud is scoped for a single entity – Only such entity has access to the information in the private cloud – Achieving compliance is much easier
Private
• Resource Management – Manual management of computing resources
including: purchasing, housing, updating and maintaining
• Direct Control
Hybrid Cloud
Copyright © 2015 AppDynamics. All rights reserved. 22
• Combination of a Public Cloud Provider & Private Cloud Platform
• Huge surge in the adoption in the recent years
Hybrid
Private Public
Hybrid Cloud
Copyright © 2015 AppDynamics. All rights reserved. 23
• Allows storage and processing of privileged data and applications in private cloud
• Enables the use of vast computational resources of the public cloud that relies on the sensitive data from private cloud
• Unique benefits of “Cloud Bursting” Hybrid
Private Public
Monitoring Hybrid Cloud
Copyright © 2015 AppDynamics. All rights reserved. 24
• Monitoring of complex Hybrid Cloud set-ups is far from straightforward
• Requires a solution that can trace distributed execution from private to public cloud and vice versa
• Identification of the root-cause becomes extremely problematic
Hybrid Private Public
AppDynamics & Hybrid Cloud
• Distributed tracing from private cloud infrastructures all the way to the public cloud services
• Identify which services are causing issues down to the line number
Copyright © 2015 AppDynamics. All rights reserved. 25
MICROSERVICES & APPDYNAMICS
Microservices
Copyright © 2015 AppDynamics. All rights reserved. 27
• Big shift in modern enterprise
• Move from monolithic architectures to groups of independently deployable services
• Huge surge in the adoption in recent years
Microservices
Microservices vs Monolithic
Copyright © 2015 AppDynamics. All rights reserved. 28
Microservices Monolithic
Monolithic Architecture
Copyright © 2015 AppDynamics. All rights reserved. 29
• Encapsulates all of the functionality in a single application
• Traditional “Layered” approach to building systems
• Drawbacks: – Agility is hindered – Technology stack is hard to change – Changes to the system requires complete rebuilding of entire
application
Monolithic
Microservices Architecture
Copyright © 2015 AppDynamics. All rights reserved. 30
• Transforms a single application into a number of smaller “services”
• Typical service exhibits the following characteristics – Independently deployable/upgradable – Encapsulates a single “smaller” functionality – Clear module boundary
• Drawbacks: – Remote API calls can and will quickly become expensive – Requires re-aligning of different teams – Data consistency potentially needs to be actively managed
Microservices
Monitoring Microservices
Copyright © 2015 AppDynamics. All rights reserved. 31
• Microservices are highly distributed by nature
• Monitoring health and performance becomes crucially important – API calls need to be streamlined – More individually moving parts = more ambiguity – Hard to nail down the root of the problem
Microservices
Microservices & AppDynamics
Copyright © 2015 AppDynamics. All rights reserved. 32
Thank You