I will attach the document of remotecache assertion.
Yes, you can install memcached server on one of gateway nodes. But it's not recommended to do so on production env.
Reasons are,
- It's designed to be used via TCP
- The size of cached data can be various, you might not be able to control the memory usage.
Therefore, typically the memcached server is NOT installed on the same machine as application server.
Regards,
Mark