TGViewer
C++ - Reddit C++ - Reddit @r_cpp Β· 228 subscribers
Post #24079 24
πŸš€ I Built a Production-Grade C++ Web Crawler That Hits 200+ Pages/Sec (Open Source!)

Hey Reddit! πŸ‘‹

Spent the last month building a **high-performance web crawler in C++** that's actually production-ready. Think search engine infrastructure meets respectful crawling – fast, reliable, and doesn't piss off webmasters.

# πŸ’ͺ Why this is different:

Most crawlers are either slow Python scripts or aggressive black boxes. This one's **built for scale** while being a good internet citizen. Perfect for building search indexes, ML datasets, content monitoring, or competitive intelligence.

# ⚑ Performance specs:

* **50-200+ pages/second** sustained (benchmarked on real workloads)
* **HTTP/2 multiplexing** with connection reuse and keep-alive
* **SIMD-accelerated parsing** using AVX2 for content processing
* **Lock-free work-stealing queues** across multi-threaded workers
* **RocksDB persistence** – survives crashes, graceful shutdown with state recovery

# 🀝 Respectful by design:

βœ… Full **robots.txt compliance** – never crawls what it shouldn't
βœ… **Per-domain rate limiting** with exponential backoff
βœ… **Conditional GET** with ETag/Last-Modified caching
βœ… Automatic **sitemap & RSS discovery**
βœ… **Content deduplication** to avoid wasting bandwidth

# πŸ› οΈ Built with modern C++:

* C++17 with proper concurrency primitives
* libcurl multi-interface (HTTP/2 ready)
* RocksDB for crash-safe metadata storage
* 16-partition priority queues + 256-shard rate limiter
* Tracy profiler integration for deep performance insights

# πŸ“Š Real-world benchmarks:

|Setup|Workers|Throughput|
|:-|:-|:-|
|Small VPS (2 cores, 4GB)|6|\~30-50 pages/sec|
|Medium (8 cores, 16GB)|20|\~80-120 pages/sec|
|Beefy (16+ cores, 32GB+)|40+|150-200+ pages/sec|

# 🎯 Use cases:

* Building search engine indexes
* Training data for ML/NLP models
* Content change monitoring
* SEO competitive analysis
* Archive/research projects

# πŸš€ Quick start:

bashcmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build -j$(nproc)
./build/crawler 8 4 50000 --max-runtime 60

Fully documented with architecture diagrams, tuning guides, operational playbooks, and performance profiling tips. Would love feedback from anyone working on crawling infrastructure or dealing with large-scale web scraping! πŸ•·οΈ

**GitHub:** [https://github.com/NotGyashu/Crawler](https://github.com/NotGyashu/Crawler)

https://redd.it/1o9ozzf
@r_cpp
GitHub GitHub - NotGyashu/Crawler: High-throughput(100+ pages/sec), respectful C++ web crawler with smart frontier scheduling, robots.txt… High-throughput(100+ pages/sec), respectful C++ web crawler with smart frontier scheduling, robots.txt compliance, HTTP/2 multiplexing, and RocksDB-backed persistence for production-scale ingestion...
More from @r_cpp
  1. Oct 14, 2026I tested whether a coding agent would use C++23 ranges without being told Blog post: https…
  2. Oct 14, 2026C++ futures part 1: The mental model https://devblogs.microsoft.com/oldnewthing/20261012-0…
  3. Oct 14, 2026C++ futures part 2: The mental model for std::promise, std::packaged_task https://devblogs…
  4. Oct 12, 2026[Release] slick-logger v2.2.0 β€” Lock-free asynchronous C++20 logging with multi-process sh…
  5. Oct 12, 2026Cheap alternative to reboot parameters (nohz, rcu, isolcpus) for stable benchmarks When no…
  6. Oct 12, 2026This C++ drama is crazy - Adobe votes no https://www.youtube.com/watch?v=DEqx_NMMH9Q https…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook β†’Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 β†’