Memcached: Getting Started
How to begin with Memcached
👋 Welcome to the Stackhero documentation!
Stackhero offers a ready-to-use Memcached cloud solution that provides numerous benefits, including:
- Effortless updates with just a click.
- Optimal performance and robust security powered by a private and dedicated VM.
Save time and simplify your life: it only takes 5 minutes to try Stackhero's Memcached cloud hosting solution!
Memcached is an extremely fast in-memory key/value storage system. It is widely used for caching and enhancing the performance of dynamic web applications by reducing the load on databases.
We have provided some code examples to assist you in connecting to a Memcached instance. You will find them in the following Git repository: https://github.com/stackhero-io/memcachedGettingStarted.
Encrypt Memcached communications (TLS)
By default, Memcached does not encrypt communications. However, on Stackhero, TLS encryption is enabled by default.
You will need a client that supports TLS encryption. If your preferred client does not support TLS, you can use stunnel on your client server. Stunnel listens locally on port 11211 (for unencrypted data) and forwards this data to your Stackhero instance over a TLS encrypted connection.
Protect your Memcached from brute force attacks
Your Memcached instance is protected with a username and password. Stackhero automatically sets a very strong default password. If you decide to change it, ensure that the new password is equally robust.
For enhanced security and to protect against brute force attacks, it is advisable to configure Stackhero's firewall (accessible under the "Firewall" tab) to restrict connections only to your authorised IP addresses. This step is important and can significantly improve your security.