Skip to content

Latest commit

 

History

History
6 lines (3 loc) · 1.99 KB

recommendation.md

File metadata and controls

6 lines (3 loc) · 1.99 KB

Production deployment recommendations

To harden this crawler and searcher for a real production environment, the first step would be to separate concerns into independent services: a crawl scheduler, a fleet of crawler workers, an indexing pipeline, a search API, and a UI/API gateway. The current single-process Python implementation can evolve into a worker template: wrap the crawler loop into a process that pulls crawl tasks from a durable queue (for example, Kafka, RabbitMQ, or a managed cloud queue), and writes fetched pages to a durable storage and indexing service. Since the project now supports both classical and semantic retrieval, the next production step is a hybrid search layer: keep lexical ranking in a dedicated search engine (such as OpenSearch/Elasticsearch or a managed search service) and move vector storage/retrieval to a scalable vector-capable backend. For persistence, replace the local SQLite database with a replicated database (PostgreSQL or similar) to hold crawl jobs, page metadata, embedding coverage state, and operational rate-limit state, and back it with periodic backups and observability.

On the operational side, the system should adopt strong politeness and safety controls before crawling the public internet. That includes honoring robots.txt, enforcing per-domain and global rate limits, respecting crawl budgets per domain, and providing a “kill switch” for misbehaving jobs. The services should run inside containers orchestrated by Kubernetes or another orchestrator, with metrics and tracing exported to Prometheus/Grafana or an equivalent stack. Authentication and authorization should be added around the APIs, and audit logging enabled for search queries if required. Finally, ranking can evolve from the current dual-mode baseline (classical + semantic) into a calibrated hybrid ranker (lexical + vector re-ranking), while still keeping an interpretable “debug view” so engineers and students can understand why particular URLs are returned for a query.