Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Redis, Quarkus, OpenShift From Cache to Modern Apps at Scale

Redis, Quarkus, OpenShift From Cache to Modern Apps at Scale

Redis, Kubernetes OpenShift, and the Quarkus Java stack is a powerful combo for deploying highly available, clustered databases at scale.

Holly Cummins

June 05, 2023
Tweet

More Decks by Holly Cummins

Other Decks in Programming

Transcript

  1. Redis
    From cache to time series!
    Clement Escoffier


    Distinguished Engineer


    Red Hat


    @clementplop
    Holly Cummins


    Sr. Principal Software Engineer


    Red Hat


    @holly_cummins
    Luigi Fùgaro


    Sr. Solution Architect


    Redis


    @foogaro

    View Slide

  2. @holly_cummins @clementplop @foogaro
    Redis Tech Talk #RedHat

    View Slide

  3. @holly_cummins @clementplop @foogaro
    Redis Tech Talk #RedHat
    Super-tomato

    View Slide

  4. @holly_cummins @clementplop @foogaro
    Redis Tech Talk #RedHat

    View Slide

  5. @holly_cummins @clementplop @foogaro
    Redis Tech Talk #RedHat
    s
    s s s s s ss ss s s s s s

    View Slide

  6. @holly_cummins @clementplop @foogaro
    Redis Tech Talk #RedHat

    View Slide

  7. @holly_cummins @clementplop @foogaro
    Redis Tech Talk #RedHat
    A cucumber that want to be a super-tomato

    View Slide

  8. @holly_cummins @clementplop @foogaro
    Redis Tech Talk #RedHat

    View Slide

  9. @holly_cummins @clementplop @foogaro
    Redis Tech Talk #RedHat
    A super database

    View Slide

  10. @holly_cummins @clementplop @foogaro
    Redis Tech Talk #RedHat

    View Slide

  11. @holly_cummins @clementplop @foogaro
    Redis Tech Talk #RedHat
    redis

    View Slide

  12. @holly_cummins @clementplop @foogaro
    Redis Tech Talk #RedHat
    redis
    A super super database?

    View Slide

  13. @holly_cummins @clementplop @foogaro
    Redis Tech Talk #RedHat
    @holly_cummins

    View Slide

  14. @holly_cummins @clementplop @foogaro
    Redis Tech Talk #RedHat
    +
    @holly_cummins

    View Slide

  15. @holly_cummins @clementplop @foogaro
    Redis Tech Talk #RedHat
    @clementplop

    View Slide

  16. @holly_cummins @clementplop @foogaro
    Redis Tech Talk #RedHat
    +
    @clementplop

    View Slide

  17. @holly_cummins @clementplop @foogaro
    Redis Tech Talk #RedHat
    @foogaro

    View Slide

  18. @holly_cummins @clementplop @foogaro
    Redis Tech Talk #RedHat
    @foogaro

    View Slide

  19. Open Source
    Core
    Object Mapping Libraries Jedis node-redis redis-py
    9
    go-redis
    OSS

    View Slide

  20. Data
    Structures
    Open Source
    Core
    Strings BitFields Sorted Sets Geospatial Lists
    Bitmaps Hashes Sets HyperLog Streams
    Object Mapping Libraries Jedis node-redis redis-py
    9
    go-redis
    OSS

    View Slide

  21. Data
    Structures
    Open Source
    Core
    JSON Probabilistic
    Strings BitFields Sorted Sets Geospatial Lists
    Bitmaps Hashes Sets HyperLog Streams
    Object Mapping Libraries Jedis node-redis redis-py
    9
    go-redis
    OSS

    View Slide

  22. Data
    Structures
    Developer
    Experience
    Open Source
    Core
    JSON Probabilistic
    Strings BitFields Sorted Sets Geospatial Lists
    Bitmaps Hashes Sets HyperLog Streams
    Object Mapping Libraries Jedis node-redis redis-py
    9
    go-redis
    RedisInsight
    OSS

    View Slide

  23. Data
    Structures
    Developer
    Experience
    Data
    Processing
    Engines
    Open Source
    Core
    Query & Search Server-side functions, write-
    through, write-behind
    JSON Probabilistic
    Event Streaming &
    Data Integration
    Strings BitFields Sorted Sets Geospatial Lists
    Bitmaps Hashes Sets HyperLog Streams
    Object Mapping Libraries Jedis node-redis redis-py
    9
    go-redis
    RedisInsight
    OSS

    View Slide

  24. Enterprise
    Grade
    Capabilities
    Data
    Structures
    Developer
    Experience
    Data
    Processing
    Engines
    Open Source
    Core
    Linear Scalability High Availability Durability Backup & Restore Geo-Distribution Tiered-memory
    Access
    Multi-tenant
    Security
    Query & Search Server-side functions, write-
    through, write-behind
    JSON Probabilistic
    Event Streaming &
    Data Integration
    Strings BitFields Sorted Sets Geospatial Lists
    Bitmaps Hashes Sets HyperLog Streams
    Object Mapping Libraries Jedis node-redis redis-py
    9
    go-redis
    RedisInsight
    OSS

    View Slide

  25. Enterprise
    Grade
    Capabilities
    Data
    Structures
    Developer
    Experience
    Data
    Processing
    Engines
    Open Source
    Core
    Linear Scalability High Availability Durability Backup & Restore Geo-Distribution Tiered-memory
    Access
    Multi-tenant
    Security
    Query & Search Server-side functions, write-
    through, write-behind
    JSON Probabilistic
    Event Streaming &
    Data Integration
    Strings BitFields Sorted Sets Geospatial Lists
    Bitmaps Hashes Sets HyperLog Streams
    Object Mapping Libraries Jedis node-redis redis-py
    9
    go-redis
    RedisInsight
    ENTERPRISE
    OSS

    View Slide

  26. @holly_cummins @clementplop @foogaro
    Redis Tech Talk #RedHat

    View Slide

  27. @holly_cummins @clementplop @foogaro
    Redis Tech Talk #RedHat

    View Slide

  28. @holly_cummins @clementplop @foogaro
    Redis Tech Talk #RedHat
    redis
    Super-super-database?

    View Slide

  29. Redis is a distributed key/value store
    key:1
    key:2
    key:3
    key:4
    key:5
    Value 1
    Value 2
    Value 3
    Value 4
    Value 5
    App.
    #Redis Tech Talk #RedHat @holly_cummins @clementplop @foogaro

    View Slide

  30. Redis as a cache
    Application Redis
    >> GET my-cache
    >> SET my-cache value EX 60
    null <<
    OK <<
    var value = cache.get("my-cache");


    if (value == null) {


    value = compute();


    cache.set("my-cache", value,


    Duration.ofSecond(60));


    }


    return value;


    Application Redis
    >> GET my-cache
    Value <<
    #Redis Tech Talk #RedHat @holly_cummins @clementplop @foogaro

    View Slide

  31. 389+


    Commands
    k e y s z s c o r e d e c r t s . g e t c f . i n s e r t h d e l m g e t
    timeseries.REFRESHCLUSTER FT.ALTER touch xpending bf.info
    monitor bf.card lrem json.numincrby tdigest.revrank fcall lmpop
    xreadgroup cms.initbyprob timeseries.CLUSTERSETFROMSHARD pexpire
    FT.DROP ts.del pfcount auth cf.info ts.create bgrewriteaof xadd json.del
    timeseries.INNERCOMMUNICATION graph.DELETE sdiffstore zrandmember
    bf.insert reset xlen zinterstore json.clear readwrite topk.info
    json.nummultby xtrim json.arrinsert topk.list cms.merge flushdb ts.createrule
    json.type replicaof role pexpiretime pfadd echo tdigest.rank swapdb json.objkeys
    pfmerge psubscribe hset graph.SLOWLOG FT._ALIASDELIFX incrby info ttl
    timeseries.INFOCLUSTER bitfield_ro time hrandfield discard module zinter json.set
    georadius_ro zpopmin subscribe move cf.insertnx FT.DEBUG zscan zrank FT._CREATEIFNX
    bf.reserve json.arrtrim asking sintercard graph.QUERY FT.SAFEADD json.objlen
    FT.SEARCH hsetnx flushall bitcount hget FT.AGGREGATE get sdiff strlen ts.mrevrange
    sort tdigest.merge incrbyfloat hscan srem graph.DEBUG sunionstore exec eval_ro
    spublish migrate spop psetex timeseries.CLUSTERSET cms.initbydim ts.decrby linsert
    sadd hmget setrange ssubscribe readonly cluster zmscore zrevrank lolwut hstrlen
    tdigest.add json.numpowby llen json.debug georadius function bf.exists FT.CONFIG
    FT.DICTDUMP lpop FT.ALIASDEL topk.query smembers zdiffstore zrangestore zunion debug
    restore json.arrappend zcount lpushx pexpireat timeseries.HELLO json.toggle FT.SYNDUMP
    zremrangebylex zlexcount config bitop FT.ALIASUPDATE FT.SPELLCHECK zrevrangebylex
    json.strappend tdigest.info cf.addnx bzmpop rename setex FT.SYNADD ts.info lpush
    latency ts.mget eval randomkey xsetid FT.SUGLEN wait cms.query xrange lastsave dbsize
    bzpopmax zrem setnx pfselftest hvals getrange bzpopmin lmove json.forget exists
    ts.alter zintercard acl msetnx del xautoclaim watch graph.PROFILE bf.loadchunk
    ts.madd lindex select quit lcs setbit tdigest.trimmed_mean shutdown blmove cf.del
    copy brpoplpush evalsha_ro json.arrlen rpush smismember cf.compact zremrangebyrank
    ts.range zremrangebyscore incr FT.SUGADD FT.GET pubsub FT.SUGDEL tdigest.max
    evalsha cf.count zpopmax tdigest.byrank hexists geopos FT.CURSOR zrevrangebyscore
    smove FT._DROPINDEXIFX graph.LIST georadiusbymember_ro cf.loadchunk cf.add
    slowlog bf.mexists FT.ALIASADD FT.TAGVALS memory lset object getbit xinfo sync
    sscan topk.count psync sinterstore scan client cf.scandump multi cf.exists
    json.resp getset rpoplpush bitfield dump FT.CREATE sismember getex
    cms.info restore-asking lrange command timeseries.NETWORKTEST zcard
    FT.SYNUPDATE punsubscribe blpop graph.RO_QUERY tdigest.min sunion
    geoadd zincrby zadd FT.PROFILE pttl scard getdel zrangebyscore
    geosearchstore blmpop srandmember failover cf.mexists
    #Redis Tech Talk #RedHat

    View Slide

  32. Generic
    Transaction
    Hash
    Geospatial
    Set
    Sorted Set
    String
    List
    Stream
    Pub/Sub
    BitMap
    HyperLogLog
    Bloom
    Cuckoo
    Count-M
    in
    Top-K
    T-Digest
    Graph
    JSON
    Search
    Auto-Suggest
    Time Series
    20+


    Command


    Groups
    Generic
    Transaction
    H
    ash
    Geospatial
    Set
    Sorted Set
    String
    List
    Stream
    Pub/Sub
    BitMap
    HyperLogLog
    Bloom
    Cuckoo
    Count-M
    in
    Top-K
    T-Digest
    Graph
    JSON
    Search
    Auto-Suggest
    Time Series
    #Redis Tech Talk #RedHat

    View Slide

  33. Generic
    Transaction
    Hash
    Geospatial
    Set
    Sorted Set
    String
    List
    Stream
    Pub/Sub
    BitMap
    HyperLogLog
    Bloom
    Cuckoo
    Count-M
    in
    Top-K
    T-Digest
    Graph
    JSON
    Search
    Auto-Suggest
    Time Series
    Generic
    Transaction
    H
    ash
    Geospatial
    Set
    Sorted Set
    String
    List
    Stream
    Pub/Sub
    BitMap
    HyperLogLog
    Bloom
    Cuckoo
    Count-M
    in
    Top-K
    T-Digest
    Graph
    JSON
    Search
    Auto-Suggest
    Time Series
    Redis


    Stack
    Redis


    Core
    #Redis Tech Talk #RedHat @holly_cummins @clementplop @foogaro

    View Slide

  34. Cache-Cache
    Player


    Service
    Place


    Service
    Leaderboard


    Service
    Seeker
    Game


    Monitoring
    Game


    Logic
    #Redis Tech Talk #RedHat @holly_cummins @clementplop @foogaro

    View Slide

  35. Cache-Cache
    Player


    Service
    Place


    Service
    Leaderboard


    Service
    Seeker
    Game


    Monitoring
    Game


    Logic
    #Redis Tech Talk #RedHat @holly_cummins @clementplop @foogaro

    View Slide

  36. Quarkus
    #Redis Tech Talk #RedHat
    A stack to write Java apps
    Cloud-Native Microservices Serverless
    @holly_cummins @clementplop @foogaro

    View Slide

  37. Quarkus
    #Redis Tech Talk #RedHat
    Deployment Density Cloud Bill
    Frictionless Development Experience
    640 Pods
    Kubernetes
    4 CPU Cores, 32Gb of RAM
    From 26.08$ per month/instance
    to 6.25$ per month/instance
    Medium Nano
    @holly_cummins @clementplop @foogaro

    View Slide

  38. Generic
    Transaction
    Hash
    Geospatial
    Set
    Sorted Set
    String
    List
    Stream
    Pub/Sub
    BitMap
    HyperLogLog
    Bloom
    Cuckoo
    Count-M
    in
    Top-K
    T-Digest
    Graph
    JSON
    Search
    Auto-Suggest
    Time Series
    Generic
    Transaction
    H
    ash
    Geospatial
    Set
    Sorted Set
    String
    List
    Stream
    Pub/Sub
    BitMap
    HyperLogLog
    Bloom
    Cuckoo
    Count-M
    in
    Top-K
    T-Digest
    Graph
    JSON
    Search
    Auto-Suggest
    Time Series
    Shown Today
    #Redis Tech Talk #RedHat @holly_cummins @clementplop @foogaro

    View Slide

  39. #Redis Tech Talk #RedHat @holly_cummins @clementplop @foogaro

    View Slide

  40. Final Words
    + =
    #Redis Tech Talk #RedHat @holly_cummins @clementplop @foogaro

    View Slide

  41. @clementplop
    @holly_cummins
    @foogaro
    Slides and code
    Red Hat redis

    View Slide

  42. @clementplop
    @holly_cummins
    @foogaro
    Slides and code
    Red Hat redis

    View Slide