Skip to content

TK's blog

This world is full of logic.

  • Tomcat
    • About Tomcat session cluster
    • How to setup Tomcat cluster
    • The problem of Tomcat session cluster
    • About Tomcat’s default session manager
    • About Tomcat DeltaManager
    • About Tomcat BackupManager
    • Tips on customizing session manager
    • Tomcat sticky session
    • Tuning Connection Pool for production system
  • Java
    • How to analyze high cpu usage of a Java program?
    • Java runtime parameters to enable JMX
    • Oracle JDBC slow connection on some virtual server
    • Java heap dump from command line
    • Mockito thenReturn() vs thenAnswer()
  • Spring framework
    • 8 ways to declare Spring beans
    • The inner working of DispatcherServlet
    • Implementing REST API with Spring MVC
    • About Spring ViewResolver
    • Sending data from controller to view
    • Spring Transaction with @Transactional explained
    • Combining multiple transactional method in one transaction
    • Simple ETL with Spring Batch
    • More on Spring Batch Reader
    • More on Spring Batch Writer
    • Spring Batch – Read once, Write multi example
    • Spring Batch tip – Partitioning
  • Mybatis
    • Mybatis cache mechanism
    • Integrating Mybatis with Spring
    • Using Ehcache instead of Mybatis internal cache
    • Some points to consider when using Mybatis cache
    • Implementing dynamic SQL on Mybatis
    • Parameterizing SQL on Mybatis
    • Handling big data on Mybatis
    • A tip on using user transaction on Mybatis
  • Redis
    • Installing Redis on Linux
    • Redis configuration for standalone mode
    • Setting Redis replication
    • Managing Redis replication with sentinel
    • Important Sentinel options
    • Internal working of Sentinel
    • Redis architecture for production
    • Tips on developing with Jedis
    • Redis replication gap tuning
  • Zookeeper
    • The use of Zookeeper
    • Building Zookeeper cluster
    • Programming Zookeeper – Connecting to Zookeeper
    • Programming Zookeeper – Watcher
    • Building a robust Zookeeper client : connection management
  • Kafka
    • Kafka first step – running a simple server
    • Building Kafka cluster
    • How Kafka Topic failover works?
    • How Kafka consumer works?
    • Managing Kafka log
    • At which point does Kafka consumer start to read
    • Some useful commands to manage Kafka
    • Kafka tip – keeping the order of delivery
  • MySQL
    • The difference of Isolation level – Read Committed vs Repeatable Read
    • MySQL gap lock, next key lock by example
  • Contact

Tag: Replication

Redis replication gap tuning

Redis manages replication offset between master and slaves. If you type in "INFO REPLICATION" at redis-cli, the following output comes out. For the above result, offset number can vary depending on each environment. But slave0's offset should be equal or similar to master_repl_offset. The gap between master_repl_offset and slave's offset is the amount which is … Continue reading Redis replication gap tuning →

TK Redis Leave a comment January 16, 2019

Setting Redis replication

Redis supports 1:N master-slave replication. Communcation between them is bi-directional. The following is step by step procedure. (Tested on version 4.0.6) Test environment 2 Redis are running on a host. One is master (port : 6379) and another is slave (port : 6479) Setting up replication Setting up replication happens only at slaves. The following … Continue reading Setting Redis replication →

TK Redis Leave a comment November 15, 2018November 15, 2018
  • Tomcat
    • About Tomcat session cluster
    • How to setup Tomcat cluster
    • The problem of Tomcat session cluster
    • About Tomcat’s default session manager
    • About Tomcat DeltaManager
    • About Tomcat BackupManager
    • Tips on customizing session manager
    • Tomcat sticky session
    • Tuning Connection Pool for production system
  • Java
    • How to analyze high cpu usage of a Java program?
    • Java runtime parameters to enable JMX
    • Oracle JDBC slow connection on some virtual server
    • Java heap dump from command line
    • Mockito thenReturn() vs thenAnswer()
  • Spring framework
    • 8 ways to declare Spring beans
    • The inner working of DispatcherServlet
    • Implementing REST API with Spring MVC
    • About Spring ViewResolver
    • Sending data from controller to view
    • Spring Transaction with @Transactional explained
    • Combining multiple transactional method in one transaction
    • Simple ETL with Spring Batch
    • More on Spring Batch Reader
    • More on Spring Batch Writer
    • Spring Batch – Read once, Write multi example
    • Spring Batch tip – Partitioning
  • Mybatis
    • Mybatis cache mechanism
    • Integrating Mybatis with Spring
    • Using Ehcache instead of Mybatis internal cache
    • Some points to consider when using Mybatis cache
    • Implementing dynamic SQL on Mybatis
    • Parameterizing SQL on Mybatis
    • Handling big data on Mybatis
    • A tip on using user transaction on Mybatis
  • Redis
    • Installing Redis on Linux
    • Redis configuration for standalone mode
    • Setting Redis replication
    • Managing Redis replication with sentinel
    • Important Sentinel options
    • Internal working of Sentinel
    • Redis architecture for production
    • Tips on developing with Jedis
    • Redis replication gap tuning
  • Zookeeper
    • The use of Zookeeper
    • Building Zookeeper cluster
    • Programming Zookeeper – Connecting to Zookeeper
    • Programming Zookeeper – Watcher
    • Building a robust Zookeeper client : connection management
  • Kafka
    • Kafka first step – running a simple server
    • Building Kafka cluster
    • How Kafka Topic failover works?
    • How Kafka consumer works?
    • Managing Kafka log
    • At which point does Kafka consumer start to read
    • Some useful commands to manage Kafka
    • Kafka tip – keeping the order of delivery
  • MySQL
    • The difference of Isolation level – Read Committed vs Repeatable Read
    • MySQL gap lock, next key lock by example
  • Contact
Blog at WordPress.com.