SShortSingh.
Back to feed

Top 8 Load Balancer Algorithms Explained, Including Round Robin and Least Connections

0
·1 views

A DEV Community guide walks through eight load balancer algorithms with interactive demos that show which server receives each next request. It starts with round robin, which cycles through a fixed server list in order without checking how busy each machine is. The author notes that this suits equal machines with similar request costs, but can overload one server when a single heavy upload stays put while cheap health checks rotate past it. The article then covers weighted variants and least connections, which sends traffic to the server with the fewest open requests. It also explains how Application Load Balancers and HAProxy implement these approaches, including response-time-based selection.

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
ProgrammingDEV Community ·

Python Script Converts RSS and Atom Feeds into JSON and CSV

A DEV Community tutorial explains how to turn RSS and Atom feeds into structured data using Python. The formats vary in how they structure dates and descriptions, and descriptions are often wrapped in HTML, which complicates processing. The author provides a short script built on the standard library plus requests that discovers a site's feed, normalizes its items, and exports them to CSV. Feed discovery works by reading alternate link tags on a page or checking common feed paths, and a known feed URL can be fetched directly instead.

0
ProgrammingDEV Community ·

Canvas text draws in fallback font before custom web font loads

A developer found that the first fillText call on a canvas draws with the fallback system font even when a custom web font is declared with @font-face. Tests across Chromium, Chrome, Firefox and WebKit showed no errors, and the font request is only sent when the draw happens, so the text ignores the font still in transit. Redraws after 50 ms or more used the correct font, with the delay depending on network timing. A control test confirmed the font was not requested before the first draw, meaning canvas does not wait for it. The reported fix is to await document.fonts.load() with the font string and text before drawing, which worked in all four browsers.

0
ProgrammingDEV Community ·

Git rerere Can Reuse Your Merge Conflict Fix So You Resolve It Once

Developers running multiple AI coding agents on separate branches often hit the same merge conflict repeatedly when combining their work. The article demonstrates how Git's rerere feature, short for reuse recorded resolution, solves this by remembering how a conflict was resolved. Once enabled, Git automatically reapplies a saved resolution whenever the identical conflict reappears during later merges or rebases. The walkthrough sets up a demo repository with two worktrees simulating agents editing the same login function. It then shows how to enable rerere, inspect what will be recorded with status and diff, and commit the resolution once for reuse.

0
ProgrammingDEV Community ·

Discovery Phase AI vs ChatGPT: Which Fits Your Requirements Work

A comparison piece argues that general chat assistants like ChatGPT are useful for drafting discovery material such as problem statements, requirement lists and meeting summaries. The author notes that these tools struggle to keep a multi-stage discovery consistent across weeks of work and multiple people. The article lists strengths of chat assistants, including fast first drafts, rewording, brainstorming edge cases and flexible output formats. It identifies limits such as the lack of built-in structure, answers that do not connect across conversations, and manual copy-and-paste editing with no change history. The piece is written by the team behind the product it compares, a point the article itself discloses.