Cloud Memorystore: A fully managed in-memory data store service for Redis
cloudplatform.googleblog.com
cloudplatform.googleblog.com
> ¹Basic Tier instances experience a downtime and a full cache flush during scaling. Standard Tier instance experience very minimal downtime and loss of some unreplicated data during scaling operation. ²Applicable for GA release only.
Does that mean that right now there are no persistance options with this Managed Redis cluster? I have never tried to use Redis but I've been eyeing it for a while and the most confusing part is how it handles persistence.
Apparently there are ways to have Redis configured to be pretty durable as outlined here:
https://redis.io/topics/persistence
But it doesn't look like Google is supporting either RDB nor AOF with this managed service, they say RDB is coming though.
Doesn't it heavily limits the use cases for this product and relegate it to a cooler memcache?
This is not criticism, it's just curiosity on good use cases for this product.
1) Yes, they're using Redis persistence (RDB, AOF, or a Google-written persistence layer, it's not specified).
2) Basic Tier scales by tearing down the smaller Redis instance and migrating the data (???) to a larger instance. This causes downtime, but not lost data.
3) Standard Tier migrates using replication during scaling, so there's little downtime but if data is in flight at cutover, it could be lost.
4) And "coming soon" you can migrate data in and out of Cloud Memorystore by importing and exporting RDB files.
I read it differently. When they say full cache flush doesn't that imply full database flush, I was thinking all data gets wiped on scaling operation.
There's a Redis command called FLUSHALL that deletes all the data.
1) We are not using persistence at all in beta, this is something we are working towards
2) Scaling of basic tier will result in a full cache flush and will cause downtime during the scaling process.
3) That's correct
4) Yes we will be making Import-Export of RDB very soon
Persistence is a key feature of Redis, it isn't just a fancy memcached. This severely limits the applicability of this offering.
Maybe don’t advertise it as a “data store” then.
> and features like persistence, replication and pub-sub.
(Customer testimonial) > We have used Redis on everything from storing asynchronous task queues for tens of thousands of CPUs to a centralized persisted key-value pair store for the feature vectors output by our ML models
Additionally, “persistence” isn’t mentioned at all in the “Coming soon to Cloud Memorystore” section.
I’m not trying to be a pedant, I just think it’s dangerous that it’s not made abundantly clear that there is no persistence.
Can you speak to what kind of durability you expect to achieve once persistence is in place? Is it reasonable to treat this as a durable datastore and simply have a disaster recovery plan in place? Or should applications be prepared to handle occasional minor data loss?
The Basic Tier probably only uses one instance, so they just replace it in place.
Basic Tier: Provides a standalone Redis instance. Use this tier for applications that require a simple Redis cache.
If you were only reallocating replicas you'd expect no downtime. But turning on replication isn't seamless.It's a memory store.
It looks as if free tier has persistence turned off by default and that standard tier uses snapshotting/rdb to replicate.
You can still lose an acknowledged write.
1) Data structures like lists, hashmaps and sets
2) Persistence
3) Blindingly fast
I wanted to see if Google's implementation sacrifices any speed.
snip
EDIT: I deleted the benchmark results from this post because they're meaningless. I used the "intrinsic latency" tool [0] that Redis provides, but it must be run on the server.
So my results only reflected the intrinsic latency of the client VM, not the new Cloud Memorystore.
My apologies.
Google's new Cloud Memorystore, 1.0 GB:
redis-cli -h 10.0.0.3 --intrinsic-latency 100
677411416 total runs in 100 seconds
avg latency: 0.1476 microseconds / 147.62 nanoseconds per run
Open-source Redis on a Google Cloud Platform micro instance, 0.6 GB: redis-cli -h localhost --intrinsic-latency 100
353427208 total runs in 100 seconds
avg latency: 0.2829 microseconds / 282.94 nanoseconds per run
Open-source Redis on an AWS EC2 micro instance, 1.0 GB: redis-cli -h localhost --intrinsic-latency 100
21681751 total runs in 100 seconds
avg latency: 4.6122 microseconds / 4612.17 nanoseconds per run
My benchmark:Open-source Redis on a Hetzner Cloud VPS, CX11 (92% cheaper than Google's Cloud Memorystore):
redisbench-client:~# redis-cli -h 88.99.124.195 --intrinsic-latency 100
Max latency so far: 1 microseconds.
Max latency so far: 77 microseconds.
Max latency so far: 113 microseconds.
Max latency so far: 130 microseconds.
Max latency so far: 2562 microseconds.
Max latency so far: 2835 microseconds.
Max latency so far: 4165 microseconds.
Max latency so far: 5497 microseconds.
757281326 total runs (avg latency: 0.1321 microseconds / 132.05 nanoseconds per run).
Worst run took 41628x longer than the average latency.That's good that this is handled smoothly as it's the way Redis wants auth to work.
I've always seen the security story to be one of the big weaknesses of Redis. No TLS, opt-in password with no user and only one shared password, no per-database privileges, etc.
Does anyone know the status of TLS in Redis? I heard somewhere that Amazon has a patch to add that directly, rather than having to use stunnel.
Also, antirez recently met with patch author: https://news.ycombinator.com/item?id=16943289
Do you know if they document their Terraform timeline policy for GCP anywhere?
Google does (last I checked) put some paid time into systems like Terraform so that they support GCP well, but there's always going to be more of a lag, especially before GA.
I don't know Terraform well enough to know how big the lag is for new AWS features, but some lag probably exists even there despite AWS's dominant market share.
EOM
"This provider plugin is maintained by:
The Google Cloud Graphite Team at Google
The Terraform team at HashiCorp
"So Google can also help in this regard.
Disclaimer: I work at GCP, but not on Memorystore.
"NOREPLICAS Not enough good slaves to write" errors have been extremely common, sometimes followed by problems connecting. Then operations on the memorystore instance start pending (I mean "repairing"), taking 20+ minutes. During that time I obviously get connection refused errors. This usually comes with huge spikes in network in/out that are completely unexplained by the app pointing to the service.
I thought the pitch for MemoryStore was that it was a managed service; y'know, less time on devops and all of that. I've found the exact opposite to be the case. Pay more to Google, spend more time on devops, get a redis service that doesn't work.
I use Redis on a highly controlled internal network and also local for its speed... This goes when moving to a hosted solution.
For accessing from outside GCP, yeah the broader internet latency would figure into this as any other external solution.
At Redis speeds the network latency can quite often be the bottleneck.
(Disclaimer: While I have in the past worked for the GCP team, nothing in this comment relates to my time at Google or to info I learned then.)
We do not, unfortunately. Redis service is regional and only failover from one zone to another within a region is provided.
--
I am an engineer on Memorystore Redis team.
Applications might use that endpoint like a standalone Redis instance. Requests to that endpoint will be routed to the current master.
Effectively abstracting the details about the Sentinels and their configuration from the clients.
Not too sure, just a guess.
This just boils down to the same cost as self hosting minus the self hosting hassle. So not too bad as its just easier to use + no vendor lock in since it is redis compatible at a similar price point.
If you need VPC/internal access only, or are fine with the lower level of features, or just want to consolidate on GCP services, then Cloud Memorystore can work, but otherwise I'd recommend Redis Labs.
$35 is, what, 30 minutes of an engineer's time from a company's perspective? If the management of the service would take any more than that every month (and it easily could!), you're ahead.
eg if you have multiple web servers and a lot to keep cached then it’s more economical to have one machine with a lot of memory than each web server.
Another would be keeping the cache consistent, a single instance of Redis offers atomic operations and strong consistency. E.g ensuring rate limiting is correctly applied across a service’s instances.
Another would be decoupling state from apps which is especially important for serverless/FaaS where app memory is frequently cleared.
If latency is an issue it can be mostly resolved by using a 2 tier cache, an in memory cache that is backed by a Redis cache. Redis pub sub can then be used to keep the in memory caches in sync. Stackoverflow is a good example of this architecture.