Skip to Content
마이크로서비스 아키텍처 구축(전면 개정판)
book

마이크로서비스 아키텍처 구축(전면 개정판)

by 샘 뉴먼, 정성권
June 2023
Beginner to intermediate
696 pages
14h 8m
Korean
Hanbit Media, Inc.
Content preview from 마이크로서비스 아키텍처 구축(전면 개정판)
529
13
확장
13.413.4
캐싱 캐싱
캐싱
caching
은 흔히 사용되는 성능 최적화 방법으로, 특정 작업의 이전 결과를 저장해 후속 요청
에서 값을 다시 계산하는 데 시간과 자원을 소비하지 않고 저장된 값을 사용할 수 있게 해준다.
예를 들어, 상품을 추천하기 전에 재고 수준을 확인해야 하는 추천(
Recommendation
) 마이크
로서비스를 생각해보자. 재고가 없는 상품을 추천하는 것은 아무런 의미가 없다! 하지만 우리
는 연산의 지연 시간을 개선하고자 추천 서비스에서 재고 수준의 복사본을 보관하기로 정하고
무언가를 추천해야 할 때마다 재고 수준을 확인할 필요가 없게 했다. 신뢰할 수 있는 재고 수준
의 원천은 재고 (
Inventory
) 마이크로서비스며, 이 마이크로서비스는 추천 마이크로서비스에
서 클라이언트 캐시의 원천으로 간주된다. 추천 서비스가 재고 수준을 조회해야 하는 경우 먼
저 로컬 캐시에서 조회할 수 있다. 필요한 항목이 발견되면 캐시 히트
cache
hit
로 간주하고, 데이
터를 찾지 못하면 캐시 미스
cache
miss
이므로 다운스트림 재고 마이크로서비스에서 정보를 가져
와야 한다. 원본 데이터는 당연히 변경될 수 있으므로, 추천 서비스의 캐시를 무효화할 수 있는
방법이 필요하다. 이를 통해 로컬에 캐싱된 데이터가 너무 오래돼 더 이상 사용되지 못하게 할
수 있다.
캐시는 이 예제에서와 같이 간단한 조회 결과를 저장할 수 있지만, 실제로는 복잡한 계산 결과
와 같이 어떤 종류의 데이터도 저장할 수 있다. 캐시는 지연
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

파이썬으로 살펴보는 아키텍처 패턴

파이썬으로 살펴보는 아키텍처 패턴

오현석, 해리 퍼시벌, 밥 그레고리
견고한 데이터 엔지니어링

견고한 데이터 엔지니어링

조 라이스, 맷 하우슬리
클라우드 네이티브 애플리케이션 디자인 패턴

클라우드 네이티브 애플리케이션 디자인 패턴

카순 인드라시리, 스리스칸다라자 수호티얀
개발 7년차, 매니저 1일차

개발 7년차, 매니저 1일차

권원상, 한민주, 카미유 푸르니에

Publisher Resources

ISBN: 9791169211192