Skip to content

Latest commit

 

History

History
134 lines (96 loc) · 2.67 KB

File metadata and controls

134 lines (96 loc) · 2.67 KB

📁 LogQueryX — High-Performance Log Range Query Analyzer (Mo's Algorithm)

LogQueryX ek ultra-fast log analysis tool hai jo millions of log entries par
50,000+ range queries ko instant process karta hai — directly browser ke andar,
bina backend ke, using Mo’s Algorithm.

Iska focus:
Admin / DevOps engineers / backend devs ko massive server logs par
range-based analytics instantly dena.


🚀 Features (Range Queries Supported)

LogQueryX currently supports 3 core log-analysis queries, but scalable to more:

✅ 1. Unique IP Count (L–R)

  • Range ke andar kitne unique clients / visitors aaye.

✅ 2. 500 Internal Server Errors (L–R)

  • Kitni 500 errors hui is segment me.
  • Ideal for spotting downtime clusters.

✅ 3. Login Failure Count (L–R)

  • Security analysis ke liye perfect.
  • Brute-force/dictionary attacks identify hoti hain.

⚙️ Internals: Mo’s Algorithm

Normal log analysis:

O(N × Q)  →  billions of operations → browser crash

Mo’s Algorithm:

O((N + Q) × √N)  →  millions of operations → instant

Time Complexity Breakdown:

Query Sorting:     O(Q log Q)
Add/Remove Ops:    O(1)
Final Complexity:  O((N + Q) * √N)

📏 Maximum Dataset Capability

⚡ Smooth Performance (Recommended)

N = 1,000,000 logs
Q = 50,000 queries

⚡ Acceptable Performance

N = 2,000,000
Q = 75,000

⚠ Stress-Test Upper Limit (depends on RAM)

N = 3M to 5M logs
Q = 100k+

Note:
Algorithm handle kar sakta hai,
limit sirf browser memory deti hai (since JS single-threaded hota hai).


🔥 Why Mo’s Algorithm for Logs?

Logs naturally “time-based” hote hain.
Major queries usually:

  • “Time X to Y me kitne IP aaye?”
  • “Is 10-second window me kitne 500 errors hue?”
  • “Is 5-minute window me login failures?”

Ye saari contiguous segment queries hoti hain.
Matlab Mo’s Algorithm perfect fit hai.


🧪 Benchmark Example

For:

N = 1,000,000 log entries
Q = 50,000 range queries

Naive:

~50 billion operations → freeze/crash

Mo's Algorithm:

≈ 30–40 million lightweight operations → smooth me chal jata

🧠 Real-World Use Cases

  • DevOps log inspection
  • Monitoring traffic spikes
  • Error clustering detection
  • Security incident analysis
  • Brute-force attack detection
  • Backend debugging
  • Analytics dashboards
  • API server health monitoring

🧩 Tech Highlights

  • React + Vite frontend
  • Pure client-side computation
  • Uses Mo’s Algorithm for instant performance
  • Handles multi-million logs efficiently
  • No backend needed