July 2020
M T W T F S S
« Mar    
 12345
6789101112
13141516171819
20212223242526
2728293031  

Categories

WordPress Quotes

I try to learn from the past, but I plan for the future by focusing exclusively on the present. That's were the fun is.
Donald Trump
July 2020
M T W T F S S
« Mar    
 12345
6789101112
13141516171819
20212223242526
2728293031  

Short Cuts

2012 SERVER (64)
2016 windows (9)
AIX (13)
Amazon (40)
Ansibile (19)
Apache (135)
Asterisk (2)
cassandra (2)
Centos (211)
Centos RHEL 7 (270)
centos8 (3)
chef (3)
cloud (2)
cluster (3)
Coherence (1)
DB2 (5)
DISK (25)
DNS (9)
Docker (30)
Eassy (11)
ELKS (1)
EXCHANGE (3)
Fedora (6)
ftp (5)
GIT (3)
GOD (2)
Grub (1)
Hacking (10)
Hadoop (6)
health (2)
horoscope (23)
Hyper-V (10)
IIS (15)
IPTABLES (15)
JAVA (7)
JBOSS (32)
jenkins (1)
Kubernetes (7)
Ldap (5)
Linux (188)
Linux Commands (166)
Load balancer (5)
mariadb (14)
Mongodb (4)
MQ Server (24)
MYSQL (84)
Nagios (5)
NaturalOil (13)
Nginx (35)
Ngix (1)
openldap (1)
Openstack (6)
Oracle (35)
Perl (3)
Postfix (19)
Postgresql (1)
PowerShell (2)
Python (3)
qmail (36)
Redis (12)
RHCE (28)
SCALEIO (1)
Security on Centos (29)
SFTP (1)
Shell (64)
Solaris (58)
Sql Server 2012 (4)
squid (3)
SSH (10)
SSL (14)
Storage (1)
swap (3)
TIPS on Linux (28)
tomcat (62)
Ubuntu (1)
Uncategorized (30)
Veritas (2)
vfabric (1)
VMware (28)
Weblogic (38)
Websphere (71)
Windows (19)
Windows Software (2)
wordpress (1)
ZIMBRA (17)

WP Cumulus Flash tag cloud by Roy Tanck requires Flash Player 9 or better.

Who's Online

0 visitors online now
0 guests, 0 bots, 0 members

Hit Counter provided by dental implants orange county

HaProxy high availability cluster configuration Redis notes

HaProxy high availability cluster configuration Redis notes

Goal is to make a high-availability cluster for redis sensu use. redis cluster using Sentinel + Redis three-node configuration.
Blog post before configuring details

Sentinel can be done when the master hang up automatically elect a new master, then it is not a proxy.
Therefore, we need a proxy ip to provide a client used herein HaProxy the agent.
Taking into account the HaProxy single node failure, the use of master-slave HaProxy Keepalived do in order to achieve a high-availability cluster Redis.

tar zxvf haproxy-1.4.21.tar.gz
mv haproxy-1.4.21 /usr/local/haproxy
cd /usr/local/haproxy
make install

mkdir conf
cd conf
vim haproxy.cfg

global
log 127.0.0.1   local0
log 127.0.0.1   local1 notice
#log loghost    local0 info
maxconn 4096
chroot /usr/local/haproxy
uid 99
gid 99
daemon
#debug
#quiet

defaults
log     global
mode    tcp
option  redispatch
option  dontlognull
retries 2
maxconn 2000
balance roundrobin
contimeout      5000
clitimeout      50000
srvtimeout      50000

listen  proxy 10.166.224.37:6379
#redis
server redis_10.122.224.36 10.166.224.36:6379 check inter 2000 rise 2 fall 5
server redis_10.122.224.35 10.166.224.35:6379 check inter 2000 rise 2 fall 5
server redis_10.122.224.33 10.166.224.33:6379 check inter 2000 rise 2 fall 5

/usr/local/haproxy/haproxy -f /usr/local/haproxy/conf/haproxy.cfg

[root@app2 ~]# redis-cli -h 192.168.1.11
192.168.1.11:6379> INFO
# Server
redis_version:2.8.19
redis_git_sha1:00000000
redis_git_dirty:0
redis_build_id:c0359e7aa3798aa2
redis_mode:standalone
os:Linux 3.10.0-327.28.3.el7.x86_64 x86_64
arch_bits:64
multiplexing_api:epoll
gcc_version:4.8.3
process_id:14574
run_id:399a903ee13ab0b442d81020b174cafd5d91701a
tcp_port:6379
uptime_in_seconds:2820
uptime_in_days:0
hz:10
lru_clock:14238870
config_file:/etc/redis.conf

# Clients
connected_clients:2
client_longest_output_list:0
client_biggest_input_buf:0
blocked_clients:0

# Memory
used_memory:857984
used_memory_human:837.88K
used_memory_rss:5955584
used_memory_peak:858120
used_memory_peak_human:838.01K
used_memory_lua:35840
mem_fragmentation_ratio:6.94
mem_allocator:jemalloc-3.6.0

# Persistence
loading:0
rdb_changes_since_last_save:0
rdb_bgsave_in_progress:0
rdb_last_save_time:1473855549
rdb_last_bgsave_status:ok
rdb_last_bgsave_time_sec:0
rdb_current_bgsave_time_sec:-1
aof_enabled:0
aof_rewrite_in_progress:0
aof_rewrite_scheduled:0
aof_last_rewrite_time_sec:-1
aof_current_rewrite_time_sec:-1
aof_last_bgrewrite_status:ok
aof_last_write_status:ok

# Stats
total_connections_received:7
total_commands_processed:51
instantaneous_ops_per_sec:0
total_net_input_bytes:22221
total_net_output_bytes:37208
instantaneous_input_kbps:0.00
instantaneous_output_kbps:0.00
rejected_connections:0
sync_full:0
sync_partial_ok:0
sync_partial_err:0
expired_keys:0
evicted_keys:0
keyspace_hits:1
keyspace_misses:1
pubsub_channels:0
pubsub_patterns:0
latest_fork_usec:821

# Replication
role:master
connected_slaves:0
master_repl_offset:0
repl_backlog_active:0
repl_backlog_size:1048576
repl_backlog_first_byte_offset:0
repl_backlog_histlen:0

# CPU
used_cpu_sys:1.03
used_cpu_user:0.69
used_cpu_sys_children:0.00
used_cpu_user_children:0.00

# Keyspace
db1:keys=5,expires=0,avg_ttl=0

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

  

  

  

Blue Captcha Image
Refresh

*

Protected by WP Anti Spam