For a while now we have been aware that far too many RPC calls are made on every request to mlab-ns. A typical trace was looking something like the following (only an approximation):
... whereas we would only really expect one or two calls to Memcache on each request.
Every request was making some calls related to the now defunct "reverse_proxy" module. Those calls could have possibly involved at least one call to memcache.get(), and in some cases several additional calls to memcache.set(). This PR doesn't remove the module, but mostly removes all references to it in the code, as well as unit tests.
Investigation revealed that the calls to memcache.Set() were being made by AppStats, which is currently enabled, but disabled by this PR. To my knowledge, we don't currently nor ever have used the data collected by AppStats, and we don't need the extra overhead that it creates.
Additionally, I discovered that the call to Datastore on every single request was completely unnecessary. The call was only to retrieve a Tool record, and the only field that was used was tool.show_tool_extra to find out whether to include a field "tool_extra" in the JSON output, but since all of our tools have this set to false, it never had any effect. This PR removes the call the Datastore, and just removes the possibility any "tool_extra" field, which no response ever had anyway.
This PR also:
Fixes the script field value for the warmup handler.
Removes the "deferred" and "remote_api" builtins (in addition to "appstats"), since I don't believe any of there were or are ever used.
Moves the wildcard handler to be the last in the list.
With these changes in place, the RPC call stack now looks something like this:
For a while now we have been aware that far too many RPC calls are made on every request to mlab-ns. A typical trace was looking something like the following (only an approximation):
... whereas we would only really expect one or two calls to Memcache on each request.
Every request was making some calls related to the now defunct "reverse_proxy" module. Those calls could have possibly involved at least one call to memcache.get(), and in some cases several additional calls to memcache.set(). This PR doesn't remove the module, but mostly removes all references to it in the code, as well as unit tests.
Investigation revealed that the calls to
memcache.Set()
were being made by AppStats, which is currently enabled, but disabled by this PR. To my knowledge, we don't currently nor ever have used the data collected by AppStats, and we don't need the extra overhead that it creates.Additionally, I discovered that the call to Datastore on every single request was completely unnecessary. The call was only to retrieve a
Tool
record, and the only field that was used wastool.show_tool_extra
to find out whether to include a field "tool_extra" in the JSON output, but since all of our tools have this set to false, it never had any effect. This PR removes the call the Datastore, and just removes the possibility any "tool_extra" field, which no response ever had anyway.This PR also:
With these changes in place, the RPC call stack now looks something like this:
This change is