2024-01-19-TIL

Today I Learned

Retry with Backoff Pattern

  • https://backoff-utils.readthedocs.io/en/latest/strategies.html
  • https://docs.aws.amazon.com/prescriptive-guidance/latest/cloud-design-patterns/retry-backoff.html
  • https://www.baeldung.com/resilience4j-backoff-jitter

Redis Delete Key by TTL

Redis의 Key는 TTL을 걸어서 만료되면 -2(만료) 상태가 되고 DELETE 명령어를 실행했을때와 동일하게 최종적으로는 Key가 삭제된다. 하지만 TTL을 걸어놓고 SET한게 아니라면 -1(만료기한 없음)으로 설정된다.

  • https://stackoverflow.com/questions/40358231/redis-how-to-remove-expiry-from-a-key
  • https://redis.io/commands/expire/
  • https://redis.io/commands/ttl/
  • https://www.dragonflydb.io/code-examples/python-redis-delete-key-after-time
  • https://velog.io/@2214yj/Redis%EB%8A%94-%EC%96%B4%EB%96%BB%EA%B2%8C-TTL%EC%9D%84-%EC%A7%80%EC%9B%90%ED%95%A0%EA%B9%8C
  • https://jojoldu.tistory.com/349
  • https://medium.com/@alexis.paques/multiple-login-tokens-with-expiration-with-redis-fa6524628ada