Urgent.News

What's breaking now, across thousands of outlets.

Tech

When Redis goes down, does your app die?

The Problem: The App Dies There was an incident that caused our application to fail because our Redis cache went down. It was in the middle of moving to a larger compute instance to handle a higher load, and since we only had one replica at the time, the cache became completely unavailable. The issue is that Laravel, by default, assumes your cache is always there. If Redis dies, the standard…

The application experience suffered significantly when the Redis cache went down, forcing the system to default to using the database directly. To prevent this, the Resilient Cache-Aside approach was implemented. This involved wrapping cache operations in a try-catch block to handle exceptions gracefully, thereby avoiding a 500 Internal Server Error.

However, this solution did not address the issue of timeouts. The Circuit Breaker pattern was found to be a more effective solution. By tracking failures over time, the circuit opens when failures reach a certain threshold, causing the app to skip the cache and go directly to the database. This prevents timeouts and improves user experience.

A PHP library called Ganesha was used to implement the Circuit Breaker pattern, creating a CircuitBreakerService that manages the circuit state and executes primary or fallback operations based on the circuit's state.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Using fstab instead of autofs for a samba share

A few weeks ago, I borrowed a Raspberry Pi 4B from a friend. Since it wasn't going to be used for a while, I decided to set up a network storage for our home network.

  • Author used Samba for network storage on Fedora Server 38
  • Initial autofs and crypttab configuration failed due to race condition
  • Fstab permanently mounted drive, solved Samba access issue

Uptime Kuma on Fedora with Podman Quadlet

Over the weekend, I decided to set up Uptime Kuma on my mini-server. I needed a quick way to monitor some important work services, and Uptime Kuma’s Slack notifications make it easy to get alerts…

  • Uptime Kuma installed on Fedora mini-server for service monitoring
  • Podman Quadlet used to manage containers with declarative files
  • SELinux permissions adjusted and systemd service enabled via Quadlet

Robot-use agents

  • LLMs like Claude and Fable can direct robot actions.
  • Emerging models may soon master general-purpose robot use.
  • Cloud-based LLMs could transform robots into AI-enabled devices.

More from Sunday 27 September →