SlideShare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our User Agreement and Privacy Policy.
SlideShare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our Privacy Policy and User Agreement for details.
Successfully reported this slideshow.
Activate your 14 day free trial to unlock unlimited reading.
As Monolith to Microservices migration almost became mainstream, Engineering Teams have to think about how their caching strategies will evolve in cloud-native world. Kubernetes is clear winner in containerized world so caching solutions must be cloud-ready and natural fit for Kubernetes.
Caching is an important piece in high performance microservices and choosing right architectural pattern can be crucial for your deployments. Hazelcast is a well known caching solution in open source community and can handle caching piece in microservices based applications.
In this talk, you will learn
* Distributed Caching With Hazelcast
* Distributed Caching Patterns in Kubernetes
* Kubernetes Deployment Options and Best Practices
* How to Handle Distributed Caching Day 2 Operations
As Monolith to Microservices migration almost became mainstream, Engineering Teams have to think about how their caching strategies will evolve in cloud-native world. Kubernetes is clear winner in containerized world so caching solutions must be cloud-ready and natural fit for Kubernetes.
Caching is an important piece in high performance microservices and choosing right architectural pattern can be crucial for your deployments. Hazelcast is a well known caching solution in open source community and can handle caching piece in microservices based applications.
In this talk, you will learn
* Distributed Caching With Hazelcast
* Distributed Caching Patterns in Kubernetes
* Kubernetes Deployment Options and Best Practices
* How to Handle Distributed Caching Day 2 Operations
13.
@mesutcelik
POD
Spring Boot Microservice
Hazelcast
Member
POD
Hazelcast ClusterKubernetesService
Http Request
Embedded
Spring Boot Microservice
Hazelcast
Member
Kubernetes Cluster
14.
@mesutcelik
Embedded
● Simple
● Java only
● Data co-located with Microservice JVM
15.
@mesutcelik
Python
Microservice
POD
Hazelcast
Member
Python
Microservice
POD
Hazelcast
Member
Hazelcast ClusterKubernetesService
Http Request
SideCar Kubernetes Cluster
hazelcast-client
hazelcast-client
16.
@mesutcelik
Sidecar
● Simple
● Multiple Programming Languages
○ Java, Node.js, .NET, Python, Golang
● Data co-located with Microservice POD
17.
hazelcast-proxy
sidecar
POD
Spring Boot
Application
POD
Spring Boot
Application
Hazelcast ClusterKubernetesService
Http Request
Http reverse
proxy caching
Hazelcast
Member
hazelcast-proxy
sidecar
Hazelcast
Member
Kubernetes Cluster
18.
Http reverse proxy caching
● Injecting Cache into every microservice
● No coupling with any Cache API
● Enabled w/o code change
19.
@mesutcelik
POD
Spring Boot Microservice
hazelcast-java-client
Hazelcast ClusterKubernetesService
Http Request
Client Server
POD
Hazelcast
Member
POD
Hazelcast
Member
Kubernetes Cluster
POD
Spring Boot Microservice
hazelcast-java-client
POD
ASP.NET Core
Microservice
hazelcast-dotnet-client
KubernetesService
Http Request
20.
@mesutcelik
POD
KubernetesService
Http Request
Hazelcast Cloud
POD
cloud.hazelcast.com
Hazelcast Cluster
Kubernetes Cluster
Spring Boot
Application
hazelcast-client
Spring Boot
Application
hazelcast-client
21.
@mesutcelik
Client Server
● CaaS - Cache as a Service
● Multiple Programming Languages
○ Java, nodejs, .NET, Python, Golang
● Separate Microservice and Hazelcast Layers
22.
@mesutcelik
Spring Boot - Hazelcast Embedded Config
@Bean
public Config hazelcastConfig() {
Config config = new Config();
JoinConfig joinConfig = config.getNetworkConfig().getJoin();
joinConfig.getMulticastConfig().setEnabled(false);
joinConfig.getKubernetesConfig().setEnabled(true);
return config;
}
23.
@mesutcelik
Spring Boot - Hazelcast Client Config
@Bean
public ClientConfig hazelcastConfig() {
ClientConfig config = new ClientConfig();
config.getNetworkConfig().getKubernetesConfig().setEnabled(true);
return config;
}
24.
@mesutcelik
Hazelcast Cache Put and Get Operations
@Autowired
HazelcastInstance hazelcast;
Map<String, String> cities = hazelcast.getMap("cities");
cities.put("1","Minsk");
System.out.println("Best City in the world is " + cities.get("1"));
25.
@mesutcelik
Kubernetes Deployment Options
For Hazelcast