범용 CPU 하드웨어에서 저지연 LLM 웹 검색을 위한 3계층 캐싱 아키텍처
A Three-Layer Caching Architecture for Low-Latency LLM Web Search on Commodity CPU Hardware
August 12, 2026
저자: Ayushman Bhattacharya, Nihal Gazi
cs.AI
초록
ChatGPT search, Google의 AI Overviews, Perplexity와 같은 AI 기반 검색 제품은 실시간 웹 결과에 근거하여 LLM이 합성한 답변을 제공한다. 우리는 자동화된 브라우저 에이전트와 제공자 라우팅 방식의 LLM 추론을 사용하는 오픈소스 답변 엔진인 OreoLook(이전 명칭 lixSearch)을 개발했다. 이 엔진의 로컬 검색, 캐싱, 세션 관리, 임베딩 스택은 범용 CPU 하드웨어에서 구동되며, 답변 합성은 원격 추론 제공자에 의해 수행된다. 사용량이 증가함에 따라 세션은 문맥을 상실했고, 동등한 쿼리는 중복 작업을 초래했으며, URL은 세션 간에 반복적으로 임베딩되었다.
우리는 3계층 캐싱 아키텍처를 제시한다: (1) Redis에서 최근 메시지의 롤링 윈도우를 유지하고 자동으로 Huffman 압축 디스크 아카이브로 오버플로하는 세션 컨텍스트 윈도우(Session Context Window); (2) 임베딩 벡터에 대한 코사인 유사도를 통해 질의 재표현을 포착하여 중복 LLM 호출을 제거하는 시맨틱 쿼리 캐시(Semantic Query Cache); 그리고 (3) 세션 간 임베딩 계산을 중복 제거하는 URL 임베딩 캐시(URL Embedding Cache). 단일 8-vCPU Intel Cascade Lake 서버(2 GHz, 32GB RAM)에 배포되어 3개의 컨테이너화된 레플리카에 걸쳐 30개의 Hypercorn 워커 프로세스를 실행하는 평가 대상 시스템은 0.1ms의 읽기 지연과 단 1.38MB의 메모리 오버헤드로 89.3%의 전체 Redis 키스페이스 적중률을 보고했다. 백그라운드 LRU 축출 데몬은 유휴 세션을 Redis에서 디스크로 마이그레이션하고 요청 시 다시 로드하여, 설정된 보존 정책에 따라 몇 시간 또는 며칠 후에도 재개할 수 있는 대화를 가능하게 한다.
English
AI-powered search products such as ChatGPT search, Google's AI Overviews, and Perplexity provide LLM-synthesized answers grounded in live web results. We developed OreoLook (formerly lixSearch), an open-source answer engine using automated browser agents and provider-routed LLM inference. Its local search, caching, session-management, and embedding stack runs on commodity CPU hardware; answer synthesis is performed by a remote inference provider. As usage grew, sessions lost context, equivalent queries triggered redundant work, and URLs were repeatedly embedded across sessions.
We present a three-layer caching architecture: (1) a Session Context Window maintaining a rolling window of recent messages in Redis with automatic overflow to Huffman-compressed disk archives; (2) a Semantic Query Cache catches rephrasings via cosine similarity on embedding vectors, eliminating redundant LLM invocations; and (3) a URL Embedding Cache that deduplicates embedding computations across sessions. Deployed on a single 8-vCPU Intel Cascade Lake server (2 GHz, 32 GB RAM) running 30 Hypercorn worker processes across three containerized replicas, the evaluated system reported an 89.3% aggregate Redis keyspace hit rate with 0.1 ms read latency and just 1.38 MB of memory overhead. A background LRU eviction daemon migrates idle sessions from Redis to disk and re-hydrates them on demand, enabling conversations that can be resumed hours or days later under the configured retention policy.