惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

P
Privacy International News Feed
Hacker News - Newest:
Hacker News - Newest: "LLM"
Application and Cybersecurity Blog
Application and Cybersecurity Blog
N
News and Events Feed by Topic
Hacker News: Ask HN
Hacker News: Ask HN
V2EX - 技术
V2EX - 技术
L
LINUX DO - 最新话题
Google Online Security Blog
Google Online Security Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Stack Overflow Blog
Stack Overflow Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
P
Proofpoint News Feed
A
Arctic Wolf
Forbes - Security
Forbes - Security
Spread Privacy
Spread Privacy
Security Latest
Security Latest
C
CXSECURITY Database RSS Feed - CXSecurity.com
C
CERT Recently Published Vulnerability Notes
Latest news
Latest news
AWS News Blog
AWS News Blog
M
MIT News - Artificial intelligence
GbyAI
GbyAI
V
Visual Studio Blog
T
The Blog of Author Tim Ferriss
有赞技术团队
有赞技术团队
Help Net Security
Help Net Security
博客园 - Franky
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
S
Schneier on Security
S
SegmentFault 最新的问题
Microsoft Security Blog
Microsoft Security Blog
Y
Y Combinator Blog
PCI Perspectives
PCI Perspectives
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
博客园_首页
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
P
Palo Alto Networks Blog
SecWiki News
SecWiki News
TaoSecurity Blog
TaoSecurity Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
K
Kaspersky official blog
G
Google Developers Blog
H
Hacker News: Front Page
T
Tailwind CSS Blog
aimingoo的专栏
aimingoo的专栏
博客园 - 叶小钗
T
Troy Hunt's Blog
F
Full Disclosure
T
Threat Research - Cisco Blogs

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python) The Hidden Cost of AI Systems Nobody Talks About. undefined vs undeclared, and how typeof behaves Switching from file-based jobs to NATS/Kafka in Rust without changing code io_uring Adventures: Rust Servers That Love Syscalls Why Agentic AI is Killing the Traditional Database The POUR principles of web accessibility for developers and designers Quantum Neural Network 3D — A Deep Dive into Interactive WebGL Visualization How To Install Caveman In Codex On macOS And Windows Automation Pipeline Reliability: Why Your Workflow Breaks When Nobody Is Watching I Built an 'Open World' AI Coding Agent — It Works From ANY Folder From Freelancing to Product: A Tech Service Company's SaaS Transformation China's AI Giants: Adding Tencent Hunyuan & ByteDance Doubao to AI University (74 Providers) On the Vibe Coders and Their Lies clerk: Auto-Summarize Your Claude Code Sessions AI Weekly — 2026/04/10–04/17 | The Model Lockdown Is Here, but the Toolchain Is the Real Battleground AI 週報 — 2026/04/10–2026/04/17 模型封鎖潮來了,但工具鏈才是真戰場 Maybe this is how Open-Source apps are born... 🚀 Fine-Tune LLMs with LoRA and QLoRA: 2026 Guide tRPC v11 + Next.js App Router: End-to-End Type Safety Without the Boilerplate ShadCN UI in 2026: Why I Stopped Installing Component Libraries and Started Owning My Components SaaS Billing in React Server Components: Stripe + Supabase Without a Single `useEffect` Join our DEV Weekend Challenge — $1,000 in Prizes Across TEN winners! Submissions Due April 20 at 6:59 AM UTC. Implementing FSRS Spaced Repetition in Flutter + Supabase — Adding Memory Science to an AI Learning App "I Texted My Localhost From the Train — Claude Code Fixed the Bug Before I Got Home" I Built a Sales Prep AI and It Went Deeper Than Expected Design to Code #2: One JSON, Eleven Outputs Solving the 100M-Row Problem: A Summary Table Pattern for High-Volume Push Notification Logs Flutter Web With Wasm: What Actually Changes For Developers I Built 50 Royalty-Free Soundtracks for My Side Project in a Weekend Using AI Music Generation The Vibe Coding Security Checklist: 7 Things to Check Before You Ship Stop Letting Googlebot Guess Fix Your React App's SEO Right Desconstruindo o Streaming do LinkedIn: Como Criar um Engine de Extração de Vídeo de Alta Performance com HLS e FFmpeg (EDA Part-1) EDA (Exploratory Data Analysis) Explained With Real Life — Why Looking at Your Data Is the Most Important Step in Machine Learning Brand Relationship Management at Scale: Our 4-Touch Outreach System for 200+ Brands Why String.fromEnvironment() Might Return an Empty String in Dart JGuardrails 1.0.0 — Hardening Java LLM Apps Against Jailbreaks, Toxicity, and Prompt Injection Plan and Schedule a Full Week of Threads Content From One Claude Conversation Coding Cat Oran Ep3, Five Tables Changed Everything Updated: BFF Pattern I'm done watching freelancers get buried by 200 proposals. So I'm building the alternative. This is my first post BFS Algorithm in Java Step by Step Tutorial with Examples Tracking LLM Pricing Monthly: An Open Dataset for 22 AI Models How We Measure Content ROI on a Comparison Site: Revenue Attribution Without Perfect Data Introducing Nova AI Ops: The AI-Native Operating System for SRE Teams I built a free desktop video downloader for Windows — Grabbit How Talkie OCR Helps Vision-Impaired & Dyslexic Users Read the World Around Them VRCFaceTracking安装和iPhone面捕配置教程,有bug Even CrowdStrike Can't See Your Agents The Automation Gold Rush: What n8n Workflows and Claude Are Opening Up for Developers Right Now
Performance Lessons from a Real Production Azure Application: Why Scaling Wasn't the Answer
YogitaKadam14 · 2026-06-15 · via DEV Community

Recently, I worked on an enterprise scoring and reporting application hosted on Azure SQL. What started as a simple performance issue eventually became a deep investigation into database usage, application design, caching, batching, and scalability.

Most developers have faced this situation at least once:

Users report that the application is slow.

The first reaction is: "Let's scale the infrastructure."

We thought the same.

But what if the real problem isn't CPU, memory, or database size?

This is the story of how our Scorecard application started hitting 100% DTU on Azure SQL, struggled under a relatively small production workload, and how we significantly improved performance without continuously increasing infrastructure costs.

For anyone unfamiliar with Azure SQL, DTU (Database Transaction Unit) is a blended measure of CPU, memory, and I/O. A database can hit 100% DTU even when CPU usage appears normal.


The Application

The Scorecard is a scoring and reporting platform used by healthcare auditors.

The application allows users to:

  • Complete scorecards
  • Review assessments
  • Generate reports
  • Manage templates

Due to budget constraints, the application was hosted on Azure SQL Basic (5 DTUs).

Initially everything worked perfectly.

✅ Development environment was fast.

✅ Testing looked good.

✅ No obvious performance concerns.

Then production happened.


It Worked Fine... Until It Didn't

Development → Production → Slow Performance
             ↓
         Cache Fixes
             ↓
         Scale to S0
             ↓
      Problem Returns
             ↓
      Deep Investigation
             ↓
       Root Cause Found
             ↓
      Multiple Optimizations
             ↓
     Stable Performance

As users started actively using the application, we began receiving complaints:

  • Scorecards were loading slowly
  • Reports were taking too long to generate
  • Save operations felt sluggish

Our first response was straightforward:

  • Adjust cache settings
  • Tune cache TTL values
  • Apply a few quick optimizations

Things improved.

For a while.

Then the same issue returned.


The DTU Surprise

Before making any changes, we needed to understand where the bottleneck actually was.

The most valuable tool during this investigation wasn't caching, indexing, or scaling.

It was monitoring.

If we had looked only at application logs, we might have continued scaling infrastructure without solving the real problem.

Azure monitoring helped us identify that the bottleneck was actually in the database layer.

We started monitoring Azure resources.

First stop:

Azure App Service

Everything looked healthy.

  • CPU looked normal
  • Memory usage was acceptable
  • No obvious bottlenecks

Then we checked Azure SQL.

And found this:

DTU = 100%

At this point we assumed:

"The database tier is too small."

So we upgraded from:

Azure SQL Basic → Azure SQL S0

Problem solved?

Not really.

The application performed better for a few days.

Then the same issue returned.

Even with only 2–3 users.

That's when we realized something important:

Scaling infrastructure was treating the symptom, not the root cause.


Time to Investigate

Instead of increasing DTUs again, we decided to trace every database interaction.

What we discovered was surprising.

Opening a template

5 database calls

Loading a scorecard

40 database calls

Downloading a report

13 database calls

And that was only the visible part.

We also found:

  • Queries running inside loops
  • Repeated database reads
  • Multiple unnecessary API calls
  • Expensive search operations
  • Large datasets loaded unnecessarily

The application wasn't slow because of the number of users.

It was slow because of the amount of work being done for each user action.


The Hidden Performance Killers

1. Loading Thousands of Records to Show 20

Our grids were loading large datasets even though users could only see a small portion of the records.

This meant:

  • More SQL reads
  • Larger payloads
  • Higher memory usage

2. Saving Questions One by One

Imagine saving a scorecard with 50 questions.

The application was effectively doing:

Question 1 → Save
Question 2 → Save
Question 3 → Save
...
Question 50 → Save

That's a lot of unnecessary network traffic.


3. Repeated Data Fetching

Some lookup data and dropdown values rarely changed.

Yet they were being fetched repeatedly.

Every page refresh.

Every screen load.

Every user.


4. Search Operations

Search functionality was expensive.

Large datasets were being scanned repeatedly, causing significant pressure on the database.


The Optimization Journey

There was no single silver bullet.

Instead, we applied several focused optimizations.


1. Created Optimized Database Views

Many screens were assembling data through multiple queries and joins.

We introduced optimized database views to prepare the data closer to where it lived.

Benefits:

  • Simpler queries
  • Reduced processing
  • Faster screen loads

2. Reduced Database Trips

Instead of making multiple calls for a single screen:

Template → 5 calls
Scorecard → 40 calls
Report → 13 calls

We consolidated requests wherever possible.

Result:

  • Fewer round trips
  • Lower database load
  • Better response times

3. Implemented Smart Save Logic

Previously every question was updated.

Even if nothing had changed.

We modified the logic to:

✅ Save only changed questions

✅ Skip unchanged records

This immediately reduced unnecessary network traffic.


4. Introduced Batch Processing

Instead of:

50 questions = 50 requests

We switched to:

50 questions = 5 batch requests

Using mutation batching significantly improved save performance.


5. Added Caching

We identified reusable data and cached it.

Examples:

  • Dropdown values
  • Lookup tables
  • Reference data

One important lesson:

Cache aggressively, but always invalidate cache correctly after updates and deletes.

Otherwise performance improves while data accuracy suffers.


6. Implemented Server-Side Pagination

This was one of the most impactful improvements.

Instead of loading thousands of records:

Load only what the user can see

Benefits:

  • Smaller payloads
  • Faster grids
  • Reduced database load

7. Optimized Search

We improved search performance through:

  • Better indexing
  • Query optimization
  • More efficient lookup strategies

Result:

  • Faster search
  • Lower DTU consumption

8. Controlled Parallel Processing

Initially many operations ran sequentially.

We introduced controlled parallel execution for independent operations.

However, we intentionally limited concurrency.

Why?

Because uncontrolled parallelism can overwhelm smaller database tiers.

Optimization isn't about doing everything in parallel.

It's about doing the right amount of work in parallel.


Results

After implementing these optimizations:

✅ Reduced database round trips by more than 80% on key screens

✅ Reduced unnecessary save operations

✅ Improved report generation performance

✅ Reduced Azure SQL DTU pressure

✅ Improved user experience without increasing infrastructure costs

Most importantly:

We stopped treating the symptoms and fixed the actual problem.

We improved the application instead of continuously increasing Azure spend.


Key Lessons Learned

1. Scaling Is Not Always the Answer

Scaling can provide temporary relief.

It rarely fixes inefficient application behavior.


2. Performance Problems Hide During Development

Development environments rarely have:

  • Real data volumes
  • Real concurrency
  • Real user behavior

Production reveals the truth.


3. Loops + Database Calls = Trouble

One database call inside a loop may look harmless.

But:

1 query × 50 records × 3 users

Can quickly become hundreds of database operations.


4. Small Optimizations Compound

No single change solved our issue.

The combination of multiple improvements did.


5. Always Investigate Before Optimizing

One of the biggest takeaways from this project:

Measure first. Optimize second.

Never assume where the bottleneck is.


The Biggest Mistake We Made

Initially, we assumed:

Slow application = Small database

That assumption led us to scale infrastructure before fully understanding the problem.

The real issue wasn't database size.

The real issue was:

  • Too many database calls
  • Too much repeated work
  • Too much unnecessary data movement

This is a powerful lesson because many teams make the same mistake.

Final Thoughts

"Scaling gave us more capacity. Optimization gave us a solution."

This project completely changed how we approach performance optimization.

Before asking for more infrastructure, we now ask:

  • Can this be cached?
  • Can this be batched?
  • Can this be loaded later?
  • Can this be fetched once?
  • Can this run in parallel?

Performance optimization is rarely about one big fix.

It's usually about identifying dozens of small inefficiencies and removing them one by one.

And sometimes, that's enough to turn a struggling application into a scalable one without spending an extra dollar on infrastructure.


If there's one lesson I took from this project, it's this:

Before increasing CPU, memory, or DTUs, spend time understanding how your application behaves.

Sometimes the biggest performance gains don't come from bigger servers.

They come from fewer queries, smarter caching, better batching, and cleaner design.

Have you ever faced a similar production performance challenge? I'd love to hear your experience in the comments.