GridGain and Memcached Cache Selection - gridgain

I'm evaluating GridGain as a caching solution for my PHP based web sites. I'll be using the Memcached interface. It would be nice to be able to access different caches (i.e. a replicated cache and a local cache) on the same node. From what I can find, however, it is not possible to select a cache when using the Memcached interface; it just uses the default cache. The documentation on using the Memcached interface doesn't mention anything about which cache it uses or if a cache can be selected. Is there a way to specify the cache to use when using the Memcached interface that I have missed or can I only use the default cache?

I think the easiest way is to use the default cache.
By looking at code on GridGain server side, it looks like you could still specify cache-name in the "extra" space of memcached protocol, but it is not obvious how to achieve it from the memcached client side.
If you can switch to GridGain Client API, then you can freely use any cache you have configured.

Related

What is Azure Redis Cache?

What is Azure REDIS Cache? How to use it? When to use and when not to use it? Can I use it for a simple c# application which accesses data from MS-SQL server?
What is best source to get started with Azure Redis cache?
Azure Redis Cache offering is a Software as a service (SAAS) offering of the opensource Redis cache. You should be able to get started with the resource below:
https://azure.microsoft.com/en-in/services/cache/
https://azure.microsoft.com/en-in/documentation/services/redis-cache/
http://redis.io/documentation
There is good support for C# via 'StackExchange.Redis' nuget package. However, please explore if your application needs or will benefit from a cache solution before you get to the implementation.
Azure Cache for Redis provides an in-memory data store based on the Redis software. Redis improves the performance and scalability of an application that uses backend data stores heavily
In my application I have stored around 5 millions key/value data with each key containing around 800 records in json format under Redis cache. Called the Redis using stackexchange library(1.2.6) since the application does not support the latest version
You can go through the below links
https://learn.microsoft.com/en-us/azure/azure-cache-for-redis/cache-overview
https://learn.microsoft.com/en-us/azure/azure-cache-for-redis/cache-redis-samples

couchbase security, can I restrict the moxi port 11211 to local host

I feel like I must be really thick here but I'm struggling with couchbase configuration.
I am looking to replace memcached with couchbase and am wanting to secure things more to my liking, on the server their are a number of applications that are set up to use memcached so it needs to be as drop in as possible without changing the applications configuration.
What I have done is installed couchbase on each of the webservers like I did with memcached and so far with my config everything is working.
The problem I have is port 11211 is open to the world a large and this terrifies me, either I'm thick or I'm not looking in the right place but I want to restrict port 11211 to only be listening on localhost 127.0.0.1.
Now couchbase seems to have reams and reams of documentation but I cannot find how to do this and am starting to feel like you need to be a couchbase expert to make simple changes.
I'm aware that the security of couchbase is to use password protected buckets with SASL auth but for me this isn't an option.
While I'm on the subject and if I can change the listening interface, are their any other ports with couchbase that don't need to be open to the world and can be restricted to local host.
Many many thanks in advance for any help, I'm at my wits end.
Let's back up a bit. Unlike memcached, Couchbase is really meant to be installed as a separate tier in your infrastructure and as a cluster even if you are just using it as a high availability cache. A better architecture would be to have Couchbase installed on its own properly sized nodes (in a cluster using Couchbase buckets) and then install Moxi (Couchbase's memcached proxy) on each web server that will talk to the Couchbase cluster on your app's behalf. This architecture will give you the functionality you need, but then give you the high availability, replication, failover, etc that Couchbase is known for.
In the long run, I would recommend that you transition your code to using Couchbase's client SDKs to access the cluster as that will give you the most benefits, performance, resilience, etc. for your caching needs. Moxi is meant more as an interim step, not a final destination.

cache distribute framework for PHP

Currently, looking for cache distribution framework for my php implementation.
mainly, for local or remote cache storage.
i have some idea about "Memcache" & "Apache Cassandra".
is there any more well framework ?
thanks
javaamtho
You should consider Couchbase, as it provides a distributed persistent cache that is quite performant and super easy to use. The problem with Memcached is that it's harder to scale to additional machines, and if a machine goes down you lose all those keys and have to rebuild the cache. Cassandra also has excellent caching support but is quite a bit more complex; if you don't need the complexity Couchbase is probably a better choice.

MongoDB single server security and reliability for production environment?

I want to set up MongoDb on a single server, and I've been searching around to make sure I do it right. I have gleaned a few basics on security so far:
Enable authentication (http://www.mongodb.org/display/DOCS/Security+and+Authentication - not enabled by default?)
Only allow localhost connections
In PHP, be sure to cast GET and POST parameters to strings to avoid injection attacks (http://www.php.net/manual/en/mongo.security.php)
I've also picked up one thing about reliability.
You used to have use sharding on multiple boxes, but now you can just enable Journaling? (http://stackoverflow.com/questions/3487456/mongodb-are-reliability-issues-significant-still)
Is that the end of the story? Enable Authentication and Journaling and you are good to go a single server?
Thanks!
If you are running on a single server, then you should definitely have journaling enabled. On 2.0, this is the default for 64-bit builds; on 32-bit builds or older releases (the 1.8.x series) you can enable it with the --journal command-line flag or config file option. Be aware that using journaling will cause MongoDB to use double the memory it normally would, which is mostly an issue on 32-bit machines (since memory there is constrained to around 2GB ordinarily, with journaling it would be effectively halved).
Authentication can help, but the best security measures are to ensure that only machines you control can talk to MongoDB. You can do this with the --bind_ip command-line flag or config file option. You should also set up a firewall (iptables or similar) as an extra measure.
As for injection attacks, you should mostly be safe, so long as you don't blindly convert JSON (or similar structures) into PHP assocs and pass them directly to the MongoDB methods. If you construct the assoc yourself, by processing the $POST or $GET values, you should be safe.

equivalent of .net output cache in node.js?

New to node coming over from asp.net so was curious about the best modules/frameworks to implement caching in node.js. I would like to cache some expensive db queries so looking for an easy way to cache db results or entire http page output to memory.
In .net it would be using either httpcache or page output caching. Is there an equivalent in the node world?
Should I just set up a local memcached or redis server to accomplish this?
If you are using express then there is a settings option for enabling view cache, also since express is built on top of connect you can try to look at connect-cache module. For caching static stuff you can take a look at node-static for example. Caching database queries in memcached or redis may be highly dependent on your data structure, but I would probably choose redis since it supports more advanced data structures which may be handy.

Resources