Posts tagged: toolforge

Making it easier for Toolforge tools to surface replag

A number of tools hosted on Toolforge rely on the replicated MediaWiki databases, dubbed "Wiki Replicas". Every so often these servers have replication lag, which affects the data returned as well as the performance of the queries. And when this happens, users get confused and start reporting bugs that aren't…

MySQL connection pooling in Rust for Toolforge

Toolforge is a free cloud computing platform designed for and used by the Wikimedia movement to host various tools and bots. One of the coolest parts of using Toolforge is that you get access to redacted copies of the MediaWiki MySQL database replicas, aka the wiki replicas. (Note that whenever…

Speeding up Toolforge tools with Redis

Over the past two weeks I significantly sped up two of my Toolforge tools by using Redis, a key-value database. The two tools, checker and shorturls were slow for different reasons, but now respond instantaneously. Note that I didn't do any proper benchmarking, it's just noticably faster. If you're not…

Requiring HTTPS for my Toolforge tools

My Toolforge (formerly "Tool Labs") tools will now start requiring HTTPS, and redirecting any HTTP traffic. It's a little bit of common code for each tool, so I put it in a shared "toolforge" library. from flask import Flask import toolforge app = Flask(__name__) app.before_request(toolforge.redirect_to_https) And that's it! Your tool…