About IPTeller

Server-side visitor and IP analytics.

IPTeller is a Django/PostgreSQL visitor analytics platform that uses Celery and Redis for asynchronous processing and GeoIP services to enrich public IP addresses with geographic and network intelligence.

How it works

Django middleware captures incoming requests and records visitor identity, IP address, request path, HTTP method, response status, referrer, user-agent, and response time. Visitors use persistent UUID cookies, while IP addresses are stored as unique records associated with individual visits.

Lightweight request recording stays in the HTTP lifecycle. Expensive work, including GeoIP enrichment, runs asynchronously through Celery so the monitored application does not wait for external services.

Asynchronous IP enrichment

When IPTeller sees an unprocessed public IP address, it sends an enrichment job to the dedicated ipteller Celery queue. The worker queries ipwho.is and stores country, city, latitude, longitude, ISP, and ASN data.

A processing flag prevents duplicate enrichment. Private, loopback, reserved, and non-public addresses are excluded from external lookups.

Internal architecture

Django application
        │
        ▼
VisitorMiddleware
        │
        ├── Identify visitor
        ├── Identify IP address
        └── Record visit
                │
                ▼
           PostgreSQL
                │
                │ Unprocessed public IP
                ▼
     Celery: ipteller queue
                │
                ▼
             Redis
                │
                ▼
          Celery worker
                │
                ▼
        GeoIP provider
                │
                ▼
           PostgreSQL
                │
                ▼
         Analytics UI / API
  

Core technologies

Component Technology Purpose
Web frameworkDjangoApplication, middleware, models, HTTP processing
DatabasePostgreSQLPersistent visitor, IP, and visit data
Task processingCeleryAsynchronous and background processing
Message brokerRedis DB 0Celery task queue transport
Task resultsRedis DB 2Ipteller Celery results
SchedulingCelery BeatPeriodic retention and maintenance tasks
GeoIPipwho.isGeographic and network enrichment
Web serverGunicornDjango application serving
Reverse proxyNginxHTTPS termination and proxying
RuntimePython 3.12Application runtime

Designed as a reusable Django application

IPTeller can run as a standalone analytics service or as a reusable analytics application inside an existing Django project. Install the app, add its middleware, configure PostgreSQL, Redis, and Celery, and the host project begins collecting and enriching visitor data.

The UI or a future REST API can expose traffic history, IP intelligence, geographic distributions, referrers, response-time statistics, bot detection, anomaly detection, and threat-intelligence signals.

Security and operations

Operational notes

Protection measures

For real protection, consider adding: