So using UUID's class scope static variables I can now tell which JVM
services each request.

What I've confirmed is that at least when using reserved instances
("Always On"), Memcache entries are only found within the same JVM
instance that created the cache entry. So I only get a cache hit if
the next request goes to that same JVM.

Is this expected behavior from Memcache, or should I raise a bug
report? I pictured a highly-distributed memory cache available to the
entire application. If it's per-JVM, I'm not sure why one wouldn't
just use a Singleton or something to cache data, or why GAE RPC would
be required when invoking the Memcache API.

Thanks,
Tom

On Dec 14, 11:33 pm, Tom Phillips <tphill0...@gmail.com> wrote:
> I'm seeing unexpected (to me) Memcache behavior in my app ever since I
> enabled reserved instances (which I did first thing after 1.4.0). When
> one request adds a cache entry, subsequent requests anywhere from
> 10-60 seconds after are only able to find the entry sporadically.
>
> The cache is very lightly used and no expiry is set. I know that the
> correct key is being used by the writer and readers.
>
> The followup requests could be being handled by different JVM
> instances than the writer, but I wouldn't think this would make a
> difference. I'm not sure how to tell which instance services which
> request, I just now the request sequence. For all I know, the times it
> does find the cache entry might be only when serviced by the same JVM
> as the writer.
>
> Shouldn't Memcache entries be available to readers immediately after
> addition, and presumably available to all JVM instances? If not
> immediately for some reason, shouldn't they be available with 60
> seconds?
>
> Thanks for any insight,
> Tom

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to