{"id":3841,"date":"2026-03-15T19:46:26","date_gmt":"2026-03-15T18:46:26","guid":{"rendered":"https:\/\/hinakuu.xyz\/?p=3841"},"modified":"2026-04-11T13:17:30","modified_gmt":"2026-04-11T11:17:30","slug":"load-balancer-vs-proxy-services","status":"publish","type":"post","link":"https:\/\/hinakuu.xyz\/?p=3841","title":{"rendered":"Load balancer vs Proxy vs API Gateway"},"content":{"rendered":"\n<figure class=\"wp-block-image aligncenter size-large is-resized\"><img decoding=\"async\" src=\"https:\/\/hinakuu.xyz\/wp-content\/uploads\/2026\/03\/LoadBalancer.gif\" alt=\"\" style=\"aspect-ratio:0.7060996886866683;width:591px;height:auto\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-pale-pink-color\">Load balancer <\/mark><\/h2>\n\n\n\n<p>Un <strong>load balancer<\/strong> (ou <em>r\u00e9partiteur de charge<\/em>) est un outil qui sert \u00e0 <strong>r\u00e9partir le trafic<\/strong> (les requ\u00eates des utilisateurs) entre plusieurs serveurs.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83e\udde0 En gros :<\/h3>\n\n\n\n<p>Au lieu d\u2019envoyer tous les utilisateurs vers un seul serveur (qui peut saturer), le load balancer distribue les demandes intelligemment.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83d\udce6 Exemple simple :<\/h3>\n\n\n\n<p>Imagine un restaurant :<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>1 seul serveur \u2192 il est d\u00e9bord\u00e9 \ud83d\ude35<\/li>\n\n\n\n<li>plusieurs serveurs + un ma\u00eetre d\u2019h\u00f4tel \u2192 il r\u00e9partit les clients \ud83d\udc4c<\/li>\n<\/ul>\n\n\n\n<p>Le ma\u00eetre d\u2019h\u00f4tel = le load balancer<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u2699\ufe0f \u00c0 quoi \u00e7a sert ?<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u2705 \u00e9viter les pannes (si un serveur tombe, les autres prennent le relais)<\/li>\n\n\n\n<li>\u2705 am\u00e9liorer la vitesse (moins de surcharge)<\/li>\n\n\n\n<li>\u2705 g\u00e9rer beaucoup d\u2019utilisateurs en m\u00eame temps<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83d\udd04 Types de r\u00e9partition :<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Round robin<\/strong> : chacun son tour<\/li>\n\n\n\n<li><strong>Least connections<\/strong> : vers le serveur le moins occup\u00e9<\/li>\n\n\n\n<li><strong>IP hash<\/strong> : selon l\u2019utilisateur<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83c\udf10 O\u00f9 on l\u2019utilise ?<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>sites web (Google, Netflix\u2026)<\/li>\n\n\n\n<li>applications<\/li>\n\n\n\n<li>infrastructures cloud<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-luminous-vivid-amber-color\">Le Proxy<\/mark><\/h2>\n\n\n\n<p>Un <strong>proxy<\/strong> est un <strong>interm\u00e9diaire<\/strong> entre toi (le client) et Internet \ud83c\udf10.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83e\udde0 En gros :<\/h3>\n\n\n\n<p>Au lieu de te connecter directement \u00e0 un site, tu passes par un proxy qui fait la demande \u00e0 ta place.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83d\udce6 Exemple simple :<\/h3>\n\n\n\n<p>Imagine encore le restaurant \ud83c\udf7d\ufe0f :<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Toi \u2192 tu donnes ta commande<\/li>\n\n\n\n<li>Le serveur (proxy) \u2192 il transmet au chef<\/li>\n\n\n\n<li>Le chef \u2192 pr\u00e9pare<\/li>\n\n\n\n<li>Le serveur \u2192 te ram\u00e8ne le plat<\/li>\n<\/ul>\n\n\n\n<p>\ud83d\udc49 Le serveur = le proxy<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u2699\ufe0f \u00c0 quoi \u00e7a sert ?<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u2705 <strong>Cacher ton IP<\/strong> (anonymat)<\/li>\n\n\n\n<li>\u2705 <strong>S\u00e9curit\u00e9<\/strong> (filtrer des contenus)<\/li>\n\n\n\n<li>\u2705 <strong>Contr\u00f4le<\/strong> (ex : dans une entreprise ou \u00e9cole)<\/li>\n\n\n\n<li>\u2705 <strong>Cache<\/strong> (garder des copies pour aller plus vite)<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83d\udd04 Types de proxy :<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Forward proxy<\/strong> : agit pour le client (le plus courant)<\/li>\n\n\n\n<li><strong>Reverse proxy<\/strong> : agit pour les serveurs (souvent utilis\u00e9 avec un load balancer \ud83d\udc40)<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83d\udd17 Diff\u00e9rence rapide avec load balancer :<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Proxy<\/strong> \u2192 interm\u00e9diaire (s\u00e9curit\u00e9, anonymat, contr\u00f4le)<\/li>\n\n\n\n<li><strong>Load balancer<\/strong> \u2192 r\u00e9partit la charge entre plusieurs serveurs<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-purple-color\">API Gateway<\/mark><\/h2>\n\n\n\n<p>Une <strong>API Gateway<\/strong> est comme un <strong>point d\u2019entr\u00e9e unique<\/strong> pour toutes les requ\u00eates vers des services backend.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83e\udde0 En gros :<\/h3>\n\n\n\n<p>Au lieu que ton appli parle directement \u00e0 plein de services diff\u00e9rents, elle passe par une <strong>API Gateway<\/strong> qui s\u2019occupe de tout.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83d\udce6 Exemple simple (toujours le resto \ud83c\udf7d\ufe0f) :<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Toi \u2192 tu commandes<\/li>\n\n\n\n<li>Le ma\u00eetre d\u2019h\u00f4tel (API Gateway) \u2192 il d\u00e9cide :\n<ul class=\"wp-block-list\">\n<li>quel chef s\u2019occupe de quoi<\/li>\n\n\n\n<li>s\u2019il faut v\u00e9rifier ton acc\u00e8s<\/li>\n\n\n\n<li>comment organiser la commande<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Les chefs (services) \u2192 pr\u00e9parent<\/li>\n\n\n\n<li>Le ma\u00eetre d\u2019h\u00f4tel \u2192 te ram\u00e8ne tout<\/li>\n<\/ul>\n\n\n\n<p>\ud83d\udc49 Le ma\u00eetre d\u2019h\u00f4tel = API Gateway<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u2699\ufe0f \u00c0 quoi \u00e7a sert ?<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u2705 <strong>Point d\u2019entr\u00e9e unique<\/strong> (une seule URL pour tout)<\/li>\n\n\n\n<li>\u2705 <strong>S\u00e9curit\u00e9<\/strong> (authentification, validation)<\/li>\n\n\n\n<li>\u2705 <strong>Routage<\/strong> (envoie vers le bon service)<\/li>\n\n\n\n<li>\u2705 <strong>Transformation<\/strong> (changer format des donn\u00e9es)<\/li>\n\n\n\n<li>\u2705 <strong>Limitation<\/strong> (rate limiting)<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83d\udd04 Exemple concret :<\/h3>\n\n\n\n<p>Sans API Gateway :<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>ton app appelle <code>\/users<\/code><\/li>\n\n\n\n<li>puis <code>\/orders<\/code><\/li>\n\n\n\n<li>puis <code>\/payments<\/code><\/li>\n<\/ul>\n\n\n\n<p>Avec API Gateway :<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>ton app appelle une seule URL \u2192 la gateway distribue derri\u00e8re<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83d\udd17 Diff\u00e9rence rapide :<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Proxy<\/strong> \u2192 interm\u00e9diaire simple<\/li>\n\n\n\n<li><strong>Load balancer<\/strong> \u2192 r\u00e9partit la charge<\/li>\n\n\n\n<li><strong>API Gateway<\/strong> \u2192 <strong>chef d\u2019orchestre<\/strong> des APIs (plus intelligent \ud83d\udc40)<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Load balancer Un load balancer (ou r\u00e9partiteur de charge) est un outil qui sert \u00e0 r\u00e9partir le trafic<\/p>\n","protected":false},"author":1,"featured_media":3842,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-3841","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-reseau"],"_links":{"self":[{"href":"https:\/\/hinakuu.xyz\/index.php?rest_route=\/wp\/v2\/posts\/3841","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hinakuu.xyz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hinakuu.xyz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hinakuu.xyz\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hinakuu.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3841"}],"version-history":[{"count":7,"href":"https:\/\/hinakuu.xyz\/index.php?rest_route=\/wp\/v2\/posts\/3841\/revisions"}],"predecessor-version":[{"id":3904,"href":"https:\/\/hinakuu.xyz\/index.php?rest_route=\/wp\/v2\/posts\/3841\/revisions\/3904"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/hinakuu.xyz\/index.php?rest_route=\/wp\/v2\/media\/3842"}],"wp:attachment":[{"href":"https:\/\/hinakuu.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3841"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hinakuu.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3841"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hinakuu.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3841"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}