Over the past week we've been very busy around proxycheck.io not designing new user features but improving the existing code base in several ways.
- Refactoring the code so it's more compact, easier to read and edit in the future
- Fixing some edge-case bugs that have been discovered
- Improving performance of the API to lower latency
We're not completely done with these efforts but we have gotten pretty far. Almost all of the code that runs proxycheck.io has been improved in some way including the API itself, the dashboard, the web interface and more.
Already the API is able to answer queries incredibly quickly even as we're seeing several million queries a day. But during our testing we were able to shave 2 entire seconds off a 500 query lookup through our web interface with our new performance optimised code which when extrapolated over the millions of daily queries we handle results in huge time savings. (If you're curious it was a reduction from 22ms per query to 18ms per query with Proxy and VPN checks enabled.)
To assist us in tracking down potential code optimisations we have built a new tool called ocebot (a play on the words ocelot and bot) which makes automated queries to our API all day every day and supplies a special flag to the API when it does, this triggers the recording of the query at a deep architectural level on the node that handled ocebot's query.
The data about that query is then saved and over time statistics which we can analyse are formed so we can see at a glance what functions in our code are the slowest, what kinds of anomalies are slowing queries down some of the time but not all of the time and also to see what software optimisations we should be looking into for our overall architecture meaning the operating system, web server and databases.
Due to the way that ocebot works only the queries ocebot makes itself will be recorded so that there is no performance impact on the queries made by our customers. But it will be making queries that are similar to the ones made by our customers. Some of its queries will even serve malformed data so that we can see the performance impact of bad queries.
We hope this blog post was interesting. I'm sure we'll have some data to share on the exploits of ocebot in the future.