case study · Web crawler & search engine

DistributedCrawler

A horizontally-scalable crawler and full-text search engine running across a 7-container Dockerized system.

JavaSpring BootRabbitMQRedisMongoDBDocker
queued 0indexed 0dupes dropped 0
workers

    ↑ live model of the system — interactive

    [01] the problem

    Crawling at scale means many workers racing over the same URLs — without coordination you fetch duplicates, waste bandwidth and corrupt results.

    [02] architecture

    1. hop 01
      API
      Spring Boot — seeds crawls & serves search
    2. hop 02
      Queue
      RabbitMQ producer-consumer pipeline
    3. hop 03
      Workers ×3
      ExecutorService pools + CompletableFuture
    4. hop 04
      Dedup
      Local ConcurrentHashMap + Redis SETNX
    5. hop 05
      Store
      MongoDB with weighted text indexes

    [03] what I built

    [04] decisions

    #1

    Dedup in two layers: a cheap in-process check first, then a distributed Redis SETNX lock as the source of truth.

    #2

    At-least-once delivery + idempotent processing instead of fragile exactly-once guarantees.

    #3

    Workers are stateless containers, so throughput scales by adding replicas.

    [05] media

    screenshot 1 · coming soon
    screenshot 2 · coming soon
    next worker →
    Talent IQ