Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@itamarhaber
itamarhaber / readme.md
Last active January 4, 2016 17:09 — forked from kehati/readme.md

RedisJobStore

A Quartz Scheduler JobStore that uses Redis for persistent storage.

Configuration

To get Quartz up and running quickly with RedisJobStore, use the following example to configure your quartz.properties file:

# setting the scheduler's misfire threshold, in milliseconds 

org.quartz.jobStore.misfireThreshold: 60000

title category
Redis Cloud
marketplace

Redis Cloud is a fully-managed cloud service for hosting and running your Redis dataset in a highly-available and scalable manner, with predictable and stable top performance. You can quickly and easily get your apps up and running with Redis Cloud through its add-on for Cloud Foundry, just tell us how much memory you need and get started instantly with your first Redis database.

Redis Cloud offers true high-availability with its in-memory dataset replication and instant auto-failover mechanism, combined with its fast storage engine. You can easily import an existing dataset to any of your Redis Cloud databases, from your S3 account or from any other Redis server. Daily backups are performed automatically and in addition, you can backup your dataset manually at any given time. The service guarantees high performance, as if you were running the strongest cloud instances.

@itamarhaber
itamarhaber / gist:8827869
Last active August 29, 2015 13:56
Poor man's quick n' dirty Redis sync "monitor" in shell
watch "( redis-cli -h source info; redis-cli -h target info ) | grep '^db0:keys'"

Redis Cloud is a fully-managed cloud service for hosting and running your Redis dataset in a highly-available and scalable manner, with predictable and stable top performance. You can quickly and easily get your apps up and running with Redis Cloud through its App Service add-on at Azure Store - just tell us how much memory you need and get started instantly with your first Redis database.

Redis Cloud offers true high-availability with its in-memory dataset replication and instant auto-failover mechanism, combined with its fast storage engine. You can easily import an existing dataset to any of your Redis Cloud databases, from FTP/HTTP server or from any other Redis server. Daily backups are performed automatically and in addition, you can backup your dataset manually at any given time. The service guarantees high performance, as if you were running the strongest cloud instances.

Creating A Redis Cloud Service

Choose the Redis Cloud add-on from the Azure Store's App

Memcached Cloud is a fully-managed service for running your Memcached in a reliable and fail-safe manner. Your dataset is constantly replicated, so if a node fails, an auto-switchover mechanism guarantees data is served without interruption. Memcached Cloud provides various data persistence options as well as remote backups for disaster recovery purposes. You can quickly and easily get your apps up and running with Memcached Cloud through its through its App Service add-on at Azure Store - just tell us how much memory you need and get started instantly with your first Memcached bucket.

A Memcached bucket is created in seconds and from that moment on, all operations are fully-automated. The service completely frees developers from dealing with nodes, clusters, server lists, scaling and failure recovery, while guaranteeing absolutely no data loss.

Creating A Memcached Cloud Service

Choose the Memcached Cloud add-on from the Azure Store's App Service catalog, select

@itamarhaber
itamarhaber / infospect.lua
Created April 4, 2014 17:33
An introspective stats collector for Redis, in Redis
-- infospect.lua - an introspective stats collector for Redis, in Redis
--
-- Each time you run this script, INFO lines are added to lists with
-- their respective names.
-- Suggested usage:
-- SCRIPT LOAD infospect.lua
-- cron redis-cli EVALSHA <infospect-sha1>
-- list of stat names/prefixes to collect
local collected_stats =
@itamarhaber
itamarhaber / hitman.lua
Created April 19, 2014 16:12
Kill idle Redis connections
local l = redis.call('client', 'list')
local k = 0
for r in l:gmatch('[^\n]+') do
for c,i in r:gmatch('addr=(.+:%d+).*idle=(%d+).*') do
if tonumber(i) > tonumber(ARGV[1]) then
redis.call('client', 'kill', c)
k = k + 1
end
end
@itamarhaber
itamarhaber / hitman.py
Created April 19, 2014 16:45
Kill idle Redis connections
import redis
import re
idle_max = 300
r = redis.Redis(host="localhost", port=6379, password=None)
l = r.execute_command("client", "list")
pattern = r"addr=(.*?) .*? idle=(\d*)"
regex = re.compile(pattern)
@itamarhaber
itamarhaber / scan_del.sh
Created April 20, 2014 22:27
A bash script that deletes Redis keys by pattern using SCAN
#!/bin/bash
if [ $# -ne 3 ]
then
echo "Delete keys from Redis matching a pattern using SCAN & DEL"
echo "Usage: $0 <host> <port> <pattern>"
exit 1
fi
cursor=-1
@itamarhaber
itamarhaber / redis_suffix_search.lua
Last active April 19, 2017 21:04
Redis suffix search function in Lua. Call with key name of search terms set and the argument to search
local res = redis.call("zrangebylex", KEYS[1], "\[" .. ARGV[1]:reverse(), "\[" .. ARGV[1]:reverse() .. "\\xff")
for k, v in pairs(res) do
res[k] = v:reverse()
end
return res