Re: [tor-bugs] #12849 [Tor Sysadmin Team]: Add web cache to Onionoo's setup
#12849: Add web cache to Onionoo's setup ---+- Reporter: karsten| Owner: Type: task | Status: new Priority: normal | Milestone: Component: Tor Sysadmin Team |Version: Resolution: | Keywords: Actual Points: | Parent ID: Points: | ---+- Comment (by weasel): Can you start by adding proper Cache-Control headers to the application's output? -- Ticket URL: https://trac.torproject.org/projects/tor/ticket/12849#comment:1 Tor Bug Tracker Wiki https://trac.torproject.org/ The Tor Project: anonymity online ___ tor-bugs mailing list tor-bugs@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs
Re: [tor-bugs] #12849 [Tor Sysadmin Team]: Add web cache to Onionoo's setup
#12849: Add web cache to Onionoo's setup ---+- Reporter: karsten| Owner: Type: task | Status: new Priority: normal | Milestone: Component: Tor Sysadmin Team |Version: Resolution: | Keywords: Actual Points: | Parent ID: Points: | ---+- Comment (by karsten): Certainly. Added the following header. Does this work? {{{ Cache-Control: public,max-age=300 }}} -- Ticket URL: https://trac.torproject.org/projects/tor/ticket/12849#comment:2 Tor Bug Tracker Wiki https://trac.torproject.org/ The Tor Project: anonymity online ___ tor-bugs mailing list tor-bugs@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs
Re: [tor-bugs] #12849 [Tor Sysadmin Team]: Add web cache to Onionoo's setup
#12849: Add web cache to Onionoo's setup ---+- Reporter: karsten| Owner: Type: task | Status: new Priority: normal | Milestone: Component: Tor Sysadmin Team |Version: Resolution: | Keywords: Actual Points: | Parent ID: Points: | ---+- Comment (by weasel): I have enabled and configured Apache's mod_mem_cache. Note that this is per apache process, and not shared across workers. Is that already good enough, or should we investigate something more complex? -- Ticket URL: https://trac.torproject.org/projects/tor/ticket/12849#comment:3 Tor Bug Tracker Wiki https://trac.torproject.org/ The Tor Project: anonymity online ___ tor-bugs mailing list tor-bugs@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs
Re: [tor-bugs] #12849 [Tor Sysadmin Team]: Add web cache to Onionoo's setup
#12849: Add web cache to Onionoo's setup ---+- Reporter: karsten| Owner: Type: task | Status: new Priority: normal | Milestone: Component: Tor Sysadmin Team |Version: Resolution: | Keywords: Actual Points: | Parent ID: Points: | ---+- Comment (by karsten): You said on IRC that you switched to disk cache, which I think makes sense. I tweaked the cache-control logic to set `max-age` to values between 5 and 40 minutes. Right now I'm seeing 80% cache hits, which is pretty good. Let's look again in a day or so, but I'm optimistic. -- Ticket URL: https://trac.torproject.org/projects/tor/ticket/12849#comment:4 Tor Bug Tracker Wiki https://trac.torproject.org/ The Tor Project: anonymity online ___ tor-bugs mailing list tor-bugs@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs
Re: [tor-bugs] #12849 [Tor Sysadmin Team]: Add web cache to Onionoo's setup
#12849: Add web cache to Onionoo's setup ---+ Reporter: karsten| Owner: Type: task | Status: closed Priority: normal | Milestone: Component: Tor Sysadmin Team |Version: Resolution: implemented| Keywords: Actual Points: | Parent ID: Points: | ---+ Changes (by karsten): * status: new = closed * resolution: = implemented Comment: 86% cache hits and down from 160k to 9k requests handled by Tomcat per hour. I'd say this works really well. Thanks, weasel, for implementing this so quickly! Closing. -- Ticket URL: https://trac.torproject.org/projects/tor/ticket/12849#comment:5 Tor Bug Tracker Wiki https://trac.torproject.org/ The Tor Project: anonymity online ___ tor-bugs mailing list tor-bugs@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs
[tor-bugs] #12849 [Tor Sysadmin Team]: Add web cache to Onionoo's setup
#12849: Add web cache to Onionoo's setup ---+- Reporter: karsten| Owner: Type: task | Status: new Priority: normal | Milestone: Component: Tor Sysadmin Team |Version: Keywords: | Actual Points: Parent ID: | Points: ---+- The Onionoo service has become much more [https://people.torproject.org/~karsten/volatile/onionoo-requests.png popular] since Orbot started asking Onionoo for relay details a few weeks ago. As of today, Onionoo serves around [https://trac.torproject.org/projects/tor/ticket/12655#comment:2 160,000 requests per hour] to Orbot users. These requests are for roughly 1,000 different documents that are less than 4KB in size and updated once per hour. Up to 159,000 of these requests could be served by a cache. Would it be possible to add something like Squid in front of Apache, or can we add some other caching mechanism to Apache so that it answers certain requests itself rather than forwarding them to Tomcat? Is it possible to control this cache by making Tomcat add certain headers to its responses, like a suggested cache lifetime? The Tomcat application knows pretty well when a response is unlikely to change for 15 minutes and when it would be better to invalidate the cache entry after 5 minutes. -- Ticket URL: https://trac.torproject.org/projects/tor/ticket/12849 Tor Bug Tracker Wiki https://trac.torproject.org/ The Tor Project: anonymity online ___ tor-bugs mailing list tor-bugs@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs