SCALE APPLICATIONS FLEXIBLY WITH MICROPROFILE Ondrej Mihlyi - - PowerPoint PPT Presentation

scale applications flexibly with microprofile
SMART_READER_LITE
LIVE PREVIEW

SCALE APPLICATIONS FLEXIBLY WITH MICROPROFILE Ondrej Mihlyi - - PowerPoint PPT Presentation

SCALE APPLICATIONS FLEXIBLY WITH MICROPROFILE Ondrej Mihlyi @omihalyi SCALABLE APPLICATIONS What it means? Another buzzword? @OMihalyi HIGHLY SCALABLE APPLICATIONS !? Just great. Buzzword Bingo time! @OMihalyi SERIOUSLY, WHAT ARE WE


slide-1
SLIDE 1

SCALE APPLICATIONS FLEXIBLY WITH MICROPROFILE

Ondrej Mihályi

@omihalyi

slide-2
SLIDE 2

SCALABLE APPLICATIONS What it means? Another buzzword?

@OMihalyi

slide-3
SLIDE 3

HIGHLY SCALABLE APPLICATIONS !? Just great. Buzzword Bingo time!

@OMihalyi

slide-4
SLIDE 4

SERIOUSLY, WHAT ARE WE AFTER? The main Goal: add more resources to do the job faster.

@OMihalyi

slide-5
SLIDE 5

WHAT IS SCALABILITY

Ability to improve with more resources Not straightforward

More working hours ≠ more done More people on the job ≠ faster

@OMihalyi

slide-6
SLIDE 6

TYPES OF SCALING

VERTICAL

easy, brute force, often works inefficient, limited by physics

HORIZONTAL

enables higher scaling more complexity

@OMihalyi

slide-7
SLIDE 7

CHALLENGES OF HORIZONTAL SCALING distributed programming increased communication shared state

@OMihalyi

slide-8
SLIDE 8

SCALING WITH MICROSERVICES

Microservices HELP with scaling

granular scaling of critical parts

But... LOT MORE MOVING PARTS AND COMPLEXITY

communication bottlenecks are still a problem

@OMihalyi

slide-9
SLIDE 9

WHAT IS MICROPROFILE?

  • pen-source specification for Java

microservices ( ) microprofile.io

@OMihalyi

slide-10
SLIDE 10

MICROPROFILE HELPS WITH COMPLEXITY

unified Config API service metrics & health passing security context tracing of distributed requests recovery from network failures

@OMihalyi

slide-11
SLIDE 11

AVOIDING BOTTLENECKS : Speedup limited by the parts that don't benefit from added resources bottlenecks: sequential tasks, synchronization, communication AMDAHL'S LAW

@OMihalyi

slide-12
SLIDE 12

IN-MEMORY DATAGRIDS

distributed shared state (memory)

  • distrib. communication (locks, messaging, ...)

simple distrib. structures (map, set, queue, ...) sophisticated algorithms behind the scenes

data replication and even distribution auto-discovery of nodes

@OMihalyi

slide-13
SLIDE 13

PAYARA SERVER

derived from GlassFish Java EE Server MicroProfile 1.3 embedded Hazelcast

JCache API, session replication message bus over CDI events

@OMihalyi

slide-14
SLIDE 14

PAYARA MICRO

shares codebase with Payara Server can cluster with Payara Server runs WAR from command line embeddable, uber JAR

@OMihalyi

slide-15
SLIDE 15

SCALE UP! Once an app is designed for flexible clustering, it becomes elastic - easily adaptable to increasing load.

@OMihalyi

slide-16
SLIDE 16

DEMO TIME

slide-17
SLIDE 17

#1 MULTIPLICATION

Additional instances

more CPUs and other resources

Simple load balancer is enough

data is shared automatically

@OMihalyi

slide-18
SLIDE 18

#2 SCALING MEMORY

Data access is often a bottleneck

→ Keep data in memory

Additional instances with no apps

Dumb nodes carrying data Increase available memory Increase resilience to outages

@OMihalyi

slide-19
SLIDE 19

#2 SCALING MEMORY

slide-20
SLIDE 20

#3 SEPARATING DATA FROM LOGIC

more data → more heap and time in GC run critical apps on LITE NODES

slower data access but less GC cycles tweak GC & heap for throughput

run small devices on LITE NODES

@OMihalyi

slide-21
SLIDE 21

#2 SCALING MEMORY

slide-22
SLIDE 22

#3 SEPARATING DATA FROM LOGIC

slide-23
SLIDE 23

#4 SCALE PARTS SEPARATELY

slide-24
SLIDE 24

#4 MESSAGING TO BALANCE LOAD

slide-25
SLIDE 25

#4 SCALE APP PARTS SEPARATELY

some parts of an app are bottlenecks split those into separate services

can be scaled higher use data grid for communication

small and lean services with Payara Micro

@OMihalyi

slide-26
SLIDE 26

HAZELCAST MEMORY UTILIZATION Replicated up to X nodes Data evenly distributed Lite nodes without data Off-heap data (enterprise)

@OMihalyi

slide-27
SLIDE 27

OTHER HAZELCAST FEATURES

Auto discovery and recovery

multicast, TCP and cloud joiners data redistribution when nodes join/leave

Distributed cache (JCache API) Distributed queries and ExecutorService

@OMihalyi

slide-28
SLIDE 28

ANYTHING TO ASK?

Thank you

slide-29
SLIDE 29

RESOURCES

source code: MicroProfile: Payara: , OndrejM-demonstrations/scaling- with-datagrids an article about flexible clustering microprofile.io payara.fish payara.org

@OMihalyi