{"id":6160,"date":"2026-09-05T00:41:04","date_gmt":"2026-09-04T15:41:04","guid":{"rendered":"https:\/\/eternalsphere.net\/echoes\/?p=6160"},"modified":"2026-09-12T14:03:06","modified_gmt":"2026-09-12T05:03:06","slug":"yxq3wn6y1qmdem3","status":"publish","type":"post","link":"https:\/\/blog.eternalsphere.net\/index.php\/2026\/09\/05\/yxq3wn6y1qmdem3\/","title":{"rendered":"How Tor Chooses Relays: Geography, Guards, Bandwidth, and Network Diversity"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">A common assumption is that Tor behaves like a content-delivery network and automatically selects nearby relays.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It does not.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A Tor user in Japan is not automatically routed through Japanese relays, just as a user in Germany is not guaranteed to begin a circuit in Germany.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Tor deliberately prioritizes anonymity properties and load balancing over geographic proximity.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">A typical Tor circuit<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">A conventional Tor circuit normally contains three relay positions:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Client\n  \u2193\nGuard\n  \u2193\nMiddle\n  \u2193\nExit\n  \u2193\nDestination<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The three positions have different responsibilities.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The <strong>Guard<\/strong> sees the client\u2019s IP address but normally does not know the final destination.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The <strong>Middle Relay<\/strong> connects the Guard to the Exit and sees neither the original client nor the final destination in a directly useful form.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The <strong>Exit Relay<\/strong> connects to the destination server and therefore sees the destination traffic leaving the Tor network, although it does not directly know the original client.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Tor does not perform simple geographic nearest-node selection<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">A user in Tokyo might receive a circuit resembling:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Japan\n  \u2193\nGuard in Europe\n  \u2193\nMiddle in North America\n  \u2193\nExit in another European country<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Another circuit might involve a nearby relay, but this is not because Tor intentionally chose the geographically closest machine.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Relay selection considers factors such as:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>relay flags;<\/li>\n\n\n\n<li>measured bandwidth;<\/li>\n\n\n\n<li>consensus weights;<\/li>\n\n\n\n<li>relay family constraints;<\/li>\n\n\n\n<li>network diversity;<\/li>\n\n\n\n<li>exit policies;<\/li>\n\n\n\n<li>current Guard selection state.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Physical distance is not the main routing criterion.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This means that increasing the number of Japanese relays does not create a private Japanese Tor region or automatically reduce latency for Japanese users.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Why Guards behave differently<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Guard selection is intentionally conservative.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If a client selected a completely new first-hop relay for every circuit, an attacker operating enough relays would eventually have a greater chance of becoming the client\u2019s entry point.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Tor therefore maintains a relatively stable Guard set.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Conceptually:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>choose suitable Guards\n        \u2193\nkeep using them for a long period\n        \u2193\nreplace them only when necessary<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This reduces exposure to malicious entry relays.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Consequently, even if many excellent new relays appear in a user\u2019s home country, existing Tor clients may not immediately begin using them as Guards.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Middle Relays are globally useful<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">A new non-exit relay usually begins its life primarily as a Middle Relay.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Its traffic may originate from clients anywhere in the world.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Guard in Canada\n      \u2193\nMiddle in Japan\n      \u2193\nExit in France<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">is entirely normal.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The Japanese Middle Relay is therefore not \u201cserving Japanese users.\u201d It is contributing routing capacity to the global Tor network.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This is an important distinction.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The value of a relay located in Japan is not primarily:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">providing a geographically local service to Japanese Tor users.<\/p>\n<\/blockquote>\n\n\n\n<p class=\"wp-block-paragraph\">Its more important contribution is:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">adding another independent routing location inside the global anonymity network.<\/p>\n<\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\">Bandwidth influences selection probability<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Tor does not distribute traffic equally among relays.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A relay capable of sustaining significantly more throughput will generally receive more traffic than a much slower relay, assuming both are otherwise eligible for similar roles.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Very roughly:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Relay A\nmeasured bandwidth: high\n\nRelay B\nmeasured bandwidth: low<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Relay A is normally assigned a greater probability of being selected.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">However, raw bandwidth alone does not determine everything. Consensus weight calculations also balance traffic across Guard, Middle, and Exit positions.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For this reason:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>advertised bandwidth\n\u2260\nmeasured bandwidth\n\u2260\nconsensus weight<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">These are related but different concepts.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Why network diversity matters<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Tor also attempts to avoid constructing circuits that concentrate too many hops within the same network.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This matters because two relays operated in closely related infrastructure may be observable by the same organization.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Guard \u2192 major hosting provider A\nMiddle \u2192 major hosting provider A\nExit \u2192 another server in provider A<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">would provide poor infrastructure diversity.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Tor therefore uses information such as relay families and network prefixes when building paths.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">From a wider architectural perspective, this is why independently operated relays in less common autonomous systems can be valuable even when they do not provide enormous amounts of bandwidth.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Geography still affects performance<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Although Tor does not select relays primarily by distance, geography still affects latency.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A circuit involving three nearby regions will often have lower round-trip time than one repeatedly crossing oceans.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>East Asia \u2192 East Asia \u2192 Southeast Asia<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">will generally have lower physical propagation delay than:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>East Asia \u2192 Western Europe \u2192 North America<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">But deliberately optimizing circuits for geographic closeness could weaken anonymity properties or increase predictability.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Tor therefore accepts some performance cost in exchange for stronger routing diversity.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">A Tor relay is part of a global pool<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The most useful mental model is not:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Japanese relay\n\u2192 serves Japanese users<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">but instead:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>relay located in Japan\n\u2192 becomes one candidate in a global anonymity network<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">A stable relay may eventually participate in circuits created by users from dozens of countries.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">That is why the significance of a relay cannot be measured only by how much traffic it serves locally.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Tor is not a national network connected to other national Tor networks.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It is one distributed global network, and every relay increases the number of possible paths through it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A common assumption is that Tor behaves like a content-delivery network and automatically selects nearby relays. It does not. A Tor user in Japan is not automatically routed through Japanese relays, just as a user in Germany is not guaranteed to begin a circuit in Germany. Tor deliberately prioritizes anonymity &hellip;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[120],"tags":[245],"class_list":["post-6160","post","type-post","status-publish","format-standard","hentry","category-1s3b6h7r2zay02x","tag-tor"],"_links":{"self":[{"href":"https:\/\/blog.eternalsphere.net\/index.php\/wp-json\/wp\/v2\/posts\/6160","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.eternalsphere.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.eternalsphere.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.eternalsphere.net\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.eternalsphere.net\/index.php\/wp-json\/wp\/v2\/comments?post=6160"}],"version-history":[{"count":1,"href":"https:\/\/blog.eternalsphere.net\/index.php\/wp-json\/wp\/v2\/posts\/6160\/revisions"}],"predecessor-version":[{"id":6161,"href":"https:\/\/blog.eternalsphere.net\/index.php\/wp-json\/wp\/v2\/posts\/6160\/revisions\/6161"}],"wp:attachment":[{"href":"https:\/\/blog.eternalsphere.net\/index.php\/wp-json\/wp\/v2\/media?parent=6160"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.eternalsphere.net\/index.php\/wp-json\/wp\/v2\/categories?post=6160"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.eternalsphere.net\/index.php\/wp-json\/wp\/v2\/tags?post=6160"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}