Skip to main content

Posts

Showing posts from June, 2026
Kafka Setup with Script Code प्रकाशित: 03 जुलाई 2026 | श्रेणी: DevOps | लेखक: तकनीकी विशेषज्ञ 🌙 Dark Mode Apache Kafka एक शक्तिशाली डेटा स्ट्रीमिंग प्लेटफॉर्म है। यहाँ इसे स्क्रिप्ट कोड के ज़रिए सेटअप करने की पूरी गाइड दी गई है। Twitter LinkedIn WhatsApp चरण 1: सिस्टम जावा अपडेट काफ्का के लिए जावा आवश्यक है, इसे इंस्टॉल करने की स्क्रिप्ट नीचे दी गई है: Copy sudo apt update && sudo apt install default-jdk -y चरण 2: काफ्का डाउनलोड स्क्रिप्ट Copy wget https://apache.org tar -xzf kafka_2.13-3.5.0.tgz cd kafka_2.13-3.5.0 चरण 3: ज़ूकीपर और सर्वर स्टार्ट टर्मिनल 1 में ज़ूकीपर चलाएं: ...

How do you manage Terraform state across dev/stage/production?

  To manage Terraform state across dev , stage , and production , you must isolate each environment into its own independent state file . Sharing or mixing state files across environments can lead to catastrophic outages if a change intended for development accidentally targets production. [ 1 , 2 ] The industry standard for achieving this isolation relies on two distinct approaches, depending on the complexity of your infrastructure. [ 1 , 2 ] Option 1: File/Directory Separation (Recommended for Production) The most robust, production-grade approach is to segregate environments using explicit file paths and distinct directories. This structure allows you to enforce strict boundary permissions, such as placing the production state file in an entirely different cloud account with restricted engineer access. [ 1 , 2 , 3 , 4 ] text ├── modules/ │ ├── vpc/ │ └── ec2/ └── environments/ ├── dev/ │ ├── main.tf │ ├── variables.tf │ └── backend.tf # Unique st...

How would you identify whether traffic spike is genuine load or a DDos attack?

Identifying whether a traffic spike is genuine or a DDoS attack requires analyzing traffic patterns, payload data, and infrastructure behavior. Here are the most effective ways to tell the difference:  1. Analyze Traffic Sources and Locations Genuine: Traffic typically originates from expected geographic regions, follows standard localized diurnal patterns (peaks during the day, drops at night), and uses standard ISPs.  DDoS: Often originates from unexpected global regions, utilizes compromised IoT devices or data-center IP ranges (proxy networks), and lacks natural daily usage curves.  2. Check User-Agent and Request Headers  Genuine: Requests will present common, recognizable User-Agents (e.g., standard browsers like Chrome, Safari) and valid HTTP headers (e.g., proper Accept-Language).  DDoS: Attackers often use outdated, spoofed, or blank User-Agents. Requests may also have missing or irregular header combinations commonly found in automated botnets.  3...

A Production DB CPU suddenly hits 95% . What are the first 3 things you check?

  When a Production database hits 95% CPU, your first priority is identifying whether it's a sudden spike in traffic, a runaway query, or a resource bottleneck. Check these three things immediately: Active Processes & Long-Running Queries: Check the database's process list to identify which queries are eating up resources. Look for unoptimized queries, full table scans, or operations stuck in "locked" states that might be causing a pileup. [ 1 ] Recent Traffic & Workload Spikes: Check your monitoring tools for a sudden surge in connection count or request rate . Determine whether the spike is due to legitimate user traffic, a batch job, or a potential external DDoS attack. Hardware & Resource Contention: Verify if the server is swapping memory to disk (indicating a memory shortage) or if there is heavy disk I/O wait time. CPU spikes are often secondary symptoms of insufficient memory or poorly performing disks. If you'd like, let me know: What typ...