Mobile app version of vmapp.org
Login or Join
Mendez628

: Optimize TOR website There is VERY little to find about optimizing a website which runs in the tor network. Besides installing the tor daemon, what can you do? Are there any tricks like -I

@Mendez628

Posted in: #Nginx

There is VERY little to find about optimizing a website which runs in the tor network.
Besides installing the tor daemon, what can you do? Are there any tricks like -I don't know- connecting it to more relays than the standard config does? Anything?

Unfortunately I can't run my website over multiple servers. The only optimization I did so far is reducing the size of all images so the user doesn't have to download so much.

Sites like -for example- Grams load really quick. They must have done something to achieve that.

PS: I'm using nginx, it's optimized. Server is strong. The bottleneck is the connection to the tor network. I'm aware that it will never be as fast as in the clearnet, but I'm sure somehow I could do better.

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Mendez628

2 Comments

Sorted by latest first Latest Oldest Best

 

@LarsenBagley505

Optimization for Tor is much the same as optimization for clearnet sites. Some things that you need to keep in mind are...


The connection will always be slower due to the way Tor works, by routing the users connection through several nodes over the world before winding up at your Tor node to access your site.
The bundled Tor browser disables javascript by default as it is considered a security risk to anonymous browsing, as such your site should not depend on javascript and best practice in this instance is to remove any javascript and stick to vanilla css, images, and html to power your site. You may loose some interactivity which needs to be performed by full page refreshes but it will prevent site features from not working correctly and prevent users from needing to download a javascript file which the browser will not allow the use of anyway.
Compress and minify everything. Due to the number of hops involved the more data you are trying to push to the browser the slower the page load will be.
Accept a slower page load than in the clearnet. Due to the way that Tor operates it will always be slower to go through Tor than it is to go clearnet. Most Tor users have come to accept this as a given, and while the Tor project continues to be upgraded and enhanced to reduce those related delays it will never be able to completely eliminate them due to the underlying premise that the connection needs to be bounced across multiple nodes and an extra layer of encryption added by each node in the process.

10% popularity Vote Up Vote Down


 

@Rambettina238

Use a reverse proxy to horizontally scale. Once the connection comes out of the TOR network unencrypted, scale it like any other site. Use Apache in reverse proxy mode, or maybe Squid? Varnish? Then have multiple instances serve the request. You say you can't run on multiple servers (but don't say why), so...

Create your own CDN. Have multiple TOR nodes distributed around the world which host your images. Then your main server will send out only HTML with links to the .onion CDNs. If you are able to, just host the images on a clear net CDN like MaxCDN, which would be even faster.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme