JAVA面試題(36)

    本文首發於cartoon的博客
    轉載請註明出處:cartoonyu.github.io/cartoon-blo…java

  • Jedis 和 Redisson 有哪些區別
    • 參考博客
    • Jedis
      • 優勢
        • 輕量簡潔
        • 支持鏈接池
        • 支持pipelining、事務、LUA Scripting、Redis Sentinel、Redis Cluster
      • 缺點
        • 不支持讀寫分離
        • 文檔支持不足
    • Redisson
      • 官方推薦
      • 優勢
        • 採用非阻塞IO
        • 支持異步請求
        • 支持鏈接池
        • 支持pipelining、LUA Scripting、Redis Sentinel、Redis Cluster
        • 支持讀寫分離以及讀負載平衡
        • 可與Spring Session集成
        • 文檔支持充足
  • 怎麼保證緩存和數據庫數據的一致性
    • 先刪除緩存再更新數據庫
  • Redis 持久化有幾種方式
    • 參考博客:blog.csdn.net/chajinglong…
    • Snapshotting(快照存儲,默認存儲方式)
    • Append-only file(追加寫入)
    • 虛擬內存(2.4以後已desprecated)
    • diskstore
  • Redis 怎麼實現分佈式鎖
    • 還沒有了解加粗樣式
相關文章
相關標籤/搜索