This document provides an overview of caching strategies when using an API gateway. It first discusses different types of caches like HTTP caches, DNS caches, and database caches. It then focuses on caching strategies for web services, specifically caching within an API gateway. It discusses patterns like cache-aside, read-through, and write-through. It also covers using replication caches for API gateway infrastructure data and distributing caches between nodes. Finally, it provides examples of caching technologies that could be used in an API gateway like Ehcache, Infinispan, Hazelcast, and Redis.
Introduction of Gilwon Oh and date (2015.04.17) of the presentation.
Details about the presenter's responsibilities as a full stack developer with contact info.
Engaging in a fun guess game leading to topics on Cache and API Gateway.
Rhetorical questions about time to walk from Seoul to Busan/New York and data download estimations.
Basic distance and speed measurements including units like AU and light speed, along with cable maps.
Speed conversion data illustrating different time units up to milliseconds and the concept of time in broader terms.
Introduction to various caching types including HTTP, CPU, and Database Cache, focusing on WebService Cache.Different cache handling patterns like Cache Aside, Write-behind, and Read Through with a focus on API Gateway.
Introduction to JGroups and its architecture for building reliable group communication applications.
천문단위(AU): 지구에서 태양까지의거리 (약 150,000,000 Km)
지구 한 바퀴: 약 40,000 km (반지름: 6,400km)
지구에서 달: 약 384,400 km
광속 : 진공 상태에서 빛이 나아가는 속도 (약 300,000 km/s)
음속: 시속 1,224km 음속이 초당 340미터(섭씨 15도)
마하: 소리의 속도에 비해서 얼마나 빠른지
http://study.zum.com/book/13481
Guess? (ForFun)
Cache
API Gateway
Cache In API Gateway
Conclusion & Useful Links
18.
DBWASClient WEB
HTTP Cache
.Browser caches
. Proxy caches
. Gateway caches(reverse proxy cache)
DNS Cache
…
CPU Cache
Page Cache
Disk Cache
...
DB Internal Cache
Focus on
WebService Cache
Especially API Gateway
*Java Cache 표준 (Jboss inifinispan 주도)
JSR 107 : JCACHE - Java Temporary Caching API
JSR 347 : Data Grids for the Java platform (2015.1 withdrawal OTL)
Cache Aside Pattern
Client가R/W Storage
책임
Storage
Client
Cache
Write-behind Pattern
비동기적으로 Storage
Write (보통 delay 세팅
시간 후)
Storage
Client
Cache
Read Through/
Write Through
Cache가 R/W
Storage 책임
Storage
Client
Cache
Refresh-Ahead Pattern
주기적으로 최근에 접근
한 cache Data를 Reload
Storage
Client
Cache
http://www.slideshare.net/tmatyashovsky/from-cache-to-in-memory-data-grid-introduction-to-hazelcast
http://docs.oracle.com/cd/E15357_01/coh.360/e15723/cache_rtwtwbra.htm#COHDG5181
21.
Guess? (ForFun)
Cache
API Gateway
Cache In API Gateway
Conclusion & Useful Links
22.
API-G #1
API-G #2
4.Check
Throttling &
API Burst
1. API Call 2. API Validation
3. 2 Auth.
5. Mediation
Service #1
Service #2
Service #3
……
6. Target Service Call
Storage
#1
Storage
#2
23.
Interface
WAS #1
API-G
WAS #1
API-G
WAS#2
Interface
WAS #2
Use Remote Cache
4. Check
Throttling &
API Burst
1. API Call 2. API Validation
3. 2 Auth.
5. Mediation
Service #1
Service #2
Service #3
……
6. Target Service Call
Management
Center #1,2
Internal Interface
API Use Flow
CRUD: API Infra Data
How To use cache?
DB DB
Storage
#1
Storage
#2
24.
Guess? (ForFun)
Cache
API Gateway
Cache In API Gateway
Conclusion & Useful Links
25.
Interface
WAS #1
Cache
Interface
WAS #2
Cache
CacheReplication
Use Remote Cache
Management
Center #1,2
Internal Interface
API Use Flow
CRUD: API Infra Data
DB DB
API-G
WAS #1
Cache
API-G
WAS #2
Cache
Redis
(Slave)
Redis
(Master)
4. Check
Throttling &
API Burst
1. API Call 2. API Validation
3. 2 Auth.
5. Mediation
Service #1
Service #2
Service #3
……
6. Target Service Call
Use Ehcache-RMI P2P
Use Redis-Sentinel
https://labs.consol.de/java-caches (Ehcachevs Hazelcast vs Infinispan)
http://www.slideshare.net/tmatyashovsky/from-cache-to-in-memory-data-grid-
introduction-to-hazelcast
http://www.slideshare.net/tmatyashovsky/distributed-applications-using-
hazelcast?from_m_app=android
http://blog.ragozin.info/2009/04/caches-are-everywhere.html
http://cutajar.weebly.com/not-a-blog/caching-techniques
확장성 있는 웹 아키텍처와 분산 시스템
http://helloworld.naver.com/helloworld/textyle/206816
확장 가능한 분산 인 메모리 캐시를 제공하는 ElastiCache
http://pyrasis.com/book/TheArtOfAmazonWebServices/Chapter15
분산 메모리기반 플랫폼 Plandas # Cache Cloud http://readme.skplanet.com/?p=8884
http://knowledgecloud.tistory.com/entry/EC2-에서-클러스터링-시-유연한-설정-가져가기
GROUP
(within the sameLAN, or across a WAN)
Process
Process
Process
message
Process
join
leave or crash
message
36.
It consists of3 parts:
(1) Channel
used by application programmers to build
reliable group communication applications
(2) Building blocks
layered on top of the channel and
provide a higher abstraction level
(3) Protocol stack
protocols implements the properties specified
for a given channel.
Application
Building blocks
JChannel
GMS
MERGE
FRAG
UDP/TCP
Network
Figure 1.1 the architecture of JGroups