SShortSingh.
Back to feed

Benchmarking a cold endpoint: why splitting latency into phases matters

0
·1 views

A developer found that a single averaged latency figure hid two distinct behaviors: a tight median and a much slower tail that changed with the time of day. Recording each request's wall time as one number mixed name resolution, TCP connect, TLS handshake, and server response, making it impossible to tell network delay from application slowness. The author instead tracked connect, TLS, send, time-to-first-byte, and total durations separately, which distinguishes a slow server from an idle connection that needed waking up. A curl command with timing format flags was used to confirm the breakdown quickly, and a standard-library Python probe was written to log each phase per attempt. The key lesson is to identify which phase is being measured before optimizing, since a profiler cannot diagnose network delays.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingHacker News ·

Flexport Seeks Business Operations Leader for CEO's Office

Flexport, a freight forwarding and logistics company, is recruiting a business operations leader to work within the office of its chief executive. The job listing is posted on the company's careers page. The source material provided contains only the headline and a link, with no further details on responsibilities, compensation, or location. The posting appeared as a discussion item on Hacker News with no comments or points at the time of collection.

0
ProgrammingDEV Community ·

Azure AI Foundry Adds Model Marketplace and Governance Tools for Developers

Microsoft's Azure AI Foundry has introduced a dedicated marketplace where developers can find and integrate third-party AI models, aiming to cut development time. The platform also added an AI Governance Dashboard to help teams monitor compliance and security as AI regulations evolve. Separately, GitHub Copilot Studio now offers AI-driven code refactoring suggestions intended to improve performance and readability. Azure has further upgraded Container Apps and AKS with enhanced autoscaling and security features, and Azure AI Foundry now supports custom model training with distributed training and automated hyperparameter tuning. The roundup, compiled from community sources, provides step-by-step guidance for trying each tool.

0
ProgrammingDEV Community ·

Public-Sector Logins Secured via Low-Cost SMS OTP API in Node.js 2FA Setup

A developer guide describes using a dedicated SMS one-time-password API for two-factor login in a Node.js public-sector appointment application, keeping the provider from storing or matching codes. The application still handles expiry, resend timers, attempt lockouts, consent, and monitoring. The article argues that SMS costs scale with message sends, so reducing unnecessary resends and abuse matters more than the per-message rate. It recommends keeping a separate append-only audit record of each access decision, without storing codes, message bodies, or bearer tokens. A Go example shows how to check the provider's live API schema while handling rate limits with backoff.

0
ProgrammingDEV Community ·

Three single-file HTML tools replace IT spreadsheets for racks, IPs and inventory

A developer built three IT documentation tools to replace the spreadsheets small teams typically use for server racks, IP addresses and equipment inventory. Each tool is a single index.html file that runs in any browser without a server, database or account. The rack tool maps devices and ports with cable details, the IP tool tracks address states, VLANs and subnets, and the inventory tool flags expiring warranties and support contracts. Data is stored in a user-controlled JSON file that can sit on a network share, and the tools are open source under AGPL-3.0 with English and Spanish support.

Benchmarking a cold endpoint: why splitting latency into phases matters · ShortSingh