Showing posts with label #Key_Value. Show all posts
Showing posts with label #Key_Value. Show all posts

08 November 2020

#Apache_HBase

#Apache_HBase
What is column families?
What is standalone mode in HBase?
What is Pseudodistributed mode?
What is MapReduce.
What is LZO?
What is Thrift?
What is catalog tables in HBase?
What is cell in HBase?
What is Compaction in HBase?
What is HRegionServer in HBase
What is Apache HBase?
What is S3?
What is the use of get() method?
What is the reason of using HBase?
What is decorating Filters?
What is the full form of YCSB?
What is the use of YCSB?
What is the most common file system of HBase?
What is regionserver?
What are the operational commands of HBase?
What is use of tools command?
What is the use of shutdown command?
What is the use of truncate command?
What is use of InputFormat in MapReducr process?
What is the full form of MSLAB?
What is HBaseFsck?
What is REST?
What are the fundamental key structures of HBase?
What is JMX?
What is nagios?
What is the syntax of describe Command?
What the is the use of exists command?
What is the use of MasterServer?
What is HBase Shell?
What is the use of ZooKeeper?
What is the use of HColumnDescriptor class?
What is the function of HMaster?
What is the use of Apache HBase?
What are the features of Apache HBase?
What is the Hierarchy of Tables in Apache HBase?
What version of Hadoop do I need to run HBase?
Which operating system is supported by HBase?
Which code is used to open the connection in Hbase?
Which command is used to show the version?
Which command is used to run HBase Shell?
Which command is used to show the current HBase user?
Which filter accepts the pagesize as the parameter in HBase?
Which method is used to access HFile directly without using HBase?
Which type of data HBase can store?
How to delete the table with the shell?
How many compaction types are in HBase?
How do I upgrade Maven-managed projects from HBase 0.94 to HBase 0.96+?
How should I design my schema in HBase?
How can I troubleshoot my HBase cluster?
Difference Hive and HBase?
In how many modes HBase can run?
HBase
  • Catalog Tables
  • Column families
  • Standalone mode
  • Decorating Filters
  • YCSB
  • Pseudodistributed mode
  • MapReduce - InputFormat
  • MSLAB
  • LZO
  • HBaseFsck
  • HBase Shell
  • Compaction - Minor Compaction & Major Compaction
  • HColumnDescriptor
  • HRegionServer
  • PageFilter
Components
  • HMaster
  • HRegion Server
  • Region
  • Zookeeper
HBase surgery tools
  • MapReduce
Difference
  • HBase vs Cassandra
  • HBase vs Hive
Operational commands
  • Get
  • Delete
  • Put
  • Increment
  • Scan
Open Connection
  • Configuration myConf = HBaseConfiguration.create();
  • HTableInterface usersTable = new HTable(myConf, ?users?);
Does HBase support a structured query language like SQL?
Yes
No*
-
-

03 November 2020

#Redis

#Redis
What are the advantages and disadvantages of Redis
What are the advantages of Redis compared to memcached?
What are the benefits of using redis?
What are the commands related to Redis transactions?
What are the disadvantages of Redis partitions?
What are the Redis data elimination strategies?
What are the redis expiration strategies? Does the LRU algorithm know?
What are the suitable scenarios for Redis?
What are the underlying data structures used for Redis?
What do the terms "CPU bound" and "I/O bound" mean in context of Redis?
What happens if Redis runs out of memory?
What happens when Redis's memory runs out?
What is AOF persistence in Redis?
What is cache penetration? How to avoid it? What is a cache avalanche? How to avoid it?
What is Pipelining in Redis and when to use one?
What is Redis persistence?
What is Redis?
What is Redis? Briefly describe its advantages and disadvantages?
What is the difference between Redis replication and sharding?
What is the master-slave replication model of Redis cluster?
What is the maximum number of nodes in a Redis cluster?
What is the maximum storage capacity for a string type value?
What is the memory usage of Redis?
What is the persistence mechanism of Redis? Their advantages and disadvantages?
What is the use of pipelines in Redis?
What kinds of data elimination strategies does Redis have?
What kinds of persistence methods does Redis provide?
What physical resources does Redis consume?
What should the Redis cluster solution do? What are the options?
What to do if the cache is inconsistent with the database
Explain a use case for Sorted Set in Redis
Explain the Redis threading model
Why do Redis partitions?
Why does redis need to put all data in memory?
Why doesn't Redis officially provide a Windows version?
Why is Redis single-threaded
Why is Redis so fast
Why is the operation of Redis atomic, and how to ensure atomicity?
Why Redis does not support roll backs?
Why single-threaded redis is so fast
Why use redis/why use cache
Which data types does Redis support?
How are Redis pipelining and transaction different?
How can I exploit multiple CPU/cores for Redis?
How does Redis handle multiple threads (from different clients) updating the same data structure in Redis?
How does Redis optimize memory?
How does Redis realize ""people nearby""
How does the Redis recycling process work?
How is redis deployed in the production environment?
How is Redis different from other key-value stores?
How is replication between Redis clusters?
How many dbs does the database default in Redis?
How many keys can a Redis instance store at most? How many elements can be stored in List, Set, Sorted Set?
How much faster is Redis than MongoDB? Related To: MongoDB
How Redis implements delay queue
How to choose a database for Redis cluster?
How to choose a suitable persistence method
How to choose a suitable persistence method?
How to deal with a large number of requests
How to ensure the data consistency between the cache and the database when it is double-written?
How to expand Redis persistent data and cache?
How to set the expiration time and permanent validity of Redis key?
How to solve Redis's concurrent competition Key problem
How to understand Redis transaction?
How would you efficiently store JSON in Redis?
When choosing a cache, when to choose redis and when to choose memcached?
When to use Redis Hashes data type?
When to use Redis Lists data type?
When to use Redis over MongoDB?
When to use Redis Sets?
Redis common data structure and usage scenario analysis
Advantages and disadvantages of RDB and AOF
Are there any ways to reduce the memory usage of Redis?
Cache avalanche and cache penetration problem solutions
Cache penetration, cache breakdown, and cache avalanche solutions?
Do you know the persistence of redis? How is the bottom layer achieved? What are the advantages and disadvantages?
Do you know what Redis partitioning schemes are available?
Does Redis persist data?
Does Redis support transactions?
Does Redis transaction guarantee atomicity and does it support rollback?
Does Redis transaction support isolation?
Features of Reids
Have you ever used Redis as an asynchronous queue and how did you achieve it?
Have you used Redis as an asynchronous queue? How do you use it? What are the disadvantages?
If there's a way to check if a key already exists in a Redis list?
Is Redis a durable datastore ("D" from ACID)?
Is Redis just a cache? Related To: Caching
Lazy delete strategy
Lock mutual exclusion mechanism
Locking mechanism
Other implementations of Redis transactions
Overview of Transaction Management (ACID)
Periodically delete policies
RDB and AOF, which one should I use?
Redis common performance problems and solutions
Redis commonly used management commands
Redis data types and usage scenarios of each data type
Redis is single-threaded, how to improve the utilization of multi-core CPU?
Redis persistence mechanism (how to ensure that the data can be restored after redis hangs and restarts)
Redis's expiration strategy and memory elimination mechanism
Redis's expired key deletion strategy
Reids three different deletion strategies
Should distributed Redis be done at the early stage or at the later stage when the scale is up? Why?
Tell me about the concept of Redis hash slot?
The concept of Redis transactions
The three stages of Redis transactions
Under what circumstances will the Redis cluster solution cause the entire cluster to be unavailable?
Watch dog automatic extension mechanism
We know that the expiration time of the key is set through expire, so how to deal with the expired data?
What's the advantage of Redis vs using memory?
Will the modified configuration take effect in real time without restarting Redis?
Will there be write operation loss in Redis cluster? Why?

Redis - Key Points to Remember

🔹 Basics

  • Redis = Remote Dictionary Server, an in-memory key-value store.
  • Open-source, written in C, single-threaded (uses I/O multiplexing).
  • Default port: 6379.
  • Persistence options:
    • RDB (snapshot) - compact, fast recovery, less durable.
    • AOF (append-only file) - durable, larger, slower recovery.
    • Mixed persistence (since Redis 4.0).
  • Core data structures:
    • String - simple values, counters.
    • List - ordered collections.
    • Set - unique unordered values.
    • Sorted Set (ZSet) - ordered by score.
    • Hash - field-value pairs.
    • Bitmap, Bitfields, HyperLogLog, Geospatial, Streams.
  • Keys can have TTL (Time-to-Live) → automatic expiration.
  • Atomic operations → every command executes completely.

🔹 Intermediate

  • Transactions: MULTI, EXEC, DISCARD, WATCH.
  • Pipelining: batch commands → reduces network round-trips.
  • Replication: Master-Replica (default: asynchronous).
  • Sentinel: monitoring + automatic failover (HA).
  • Cluster: sharding across 16,384 hash slots.
  • Eviction policies when maxmemory is reached:
    • noeviction, allkeys-lru, volatile-lru, allkeys-random, volatile-ttl, volatile-lfu, allkeys-lfu.
  • Pub/Sub: fire-and-forget messaging (not persistent).
  • Streams: log-like data structure (persistent, supports consumer groups).
  • Modules ecosystem: RedisJSON, RediSearch, RedisBloom, RedisGraph, RedisAI.

🔹 Advanced

  • High Availability: Sentinel + Cluster for fault tolerance.
  • Durability tuning: AOF appendfsyncalways, everysec (default), no.
  • Hot Key issue: solved with sharding, caching layers.
  • Lazy freeing: non-blocking memory release.
  • I/O threads (since Redis 6) → faster networking.
  • Security: AUTH, ACLs (since Redis 6), TLS.
  • Monitoring: INFO, MONITOR, SLOWLOG, RedisInsight tool.
  • Use cases: caching, session store, rate limiting, leaderboards, analytics, messaging.

🔹 Best Practices

  • Use RDB + AOF (mixed persistence) in production.
  • Enable Sentinel or Cluster for HA (don't use a single node in prod).
  • Always configure maxmemory + proper eviction policy.
  • Monitor latency & slow queries using SLOWLOG and LATENCY DOCTOR.
  • Secure Redis → never expose it directly to the internet.
  • Use pipelining or Lua scripting for performance-critical operations.
  • Benchmark with redis-benchmark before production rollout.

Redis Ultra-Short Cheat Sheet

  • 🔹 Definition: In-memory key-value store (Remote Dictionary Server), written in C. Default port 6379.
  • 🔹 Threading: Single-threaded, but extremely fast (I/O multiplexing).
  • 🔹 Persistence:
    • RDB → snapshot, compact, fast recovery, risk of data loss.
    • AOF → append-only log, durable, larger, slower recovery.
    • Mixed (since 4.0) = best of both.
  • 🔹 Data Types: String, List, Set, Sorted Set, Hash, Bitmap, HyperLogLog, Geo, Streams.
  • 🔹 TTL: Keys can expire automatically (EXPIRE, TTL).
  • 🔹 Atomic ops: All Redis commands are atomic.
  • 🔹 Transactions: MULTI / EXEC / DISCARD / WATCH.
  • 🔹 Pipelining: Batch commands → reduces round-trips.
  • 🔹 Replication: Master-Replica (asynchronous by default).
  • 🔹 Sentinel: High availability (failover).
  • 🔹 Cluster: Sharding across 16,384 slots, horizontal scaling.
  • 🔹 Eviction Policies: noeviction, allkeys-lru, allkeys-lfu, volatile-ttl, etc.
  • 🔹 Pub/Sub vs Streams: Pub/Sub (ephemeral), Streams (persistent + consumer groups).
  • 🔹 Security: AUTH, ACLs (since Redis 6), TLS.
  • 🔹 Monitoring: INFO, MONITOR, SLOWLOG, LATENCY DOCTOR.
  • 🔹 Best Practices:
    • Use RDB + AOF (mixed) in production.
    • Set maxmemory + eviction policy.
    • Use pipelining / Lua for performance.
    • Protect Redis → never expose directly to internet.
    • Benchmark with redis-benchmark before deployment.

Most views on this month

Popular Posts