Questions tagged [redis]

open-source, networked, in-memory, key-value data store

Filter by
Sorted by
Tagged with
0 votes
2 answers
172 views

Fault tolerance in aggregated distributed state

I have a scheduling system that is horizontally scaled, and stores shared state in a redis key. The purpose of the system is to implement something similar to classic rate limiting, but a bit ...
NadavShmayo's user avatar
1 vote
1 answer
82 views

Non blocking algorithm for invalidating and reloading cache in concurrent environment using Redis (with Redisson)

I'm trying to come up with a peace of code that would fetch centralised cache shared across multiple threads/app instances. Callers might come in swarms. The data is a large set, reads during ...
FoxMulder's user avatar
-2 votes
1 answer
61 views

Rate limiting design

I am designing rate limiting in my application in which the rules can be dynamic. I have a basic design in which every request is validated against the rate limiting quota, which is stored in redis. ...
Sandeep's user avatar
  • 199
1 vote
3 answers
323 views

How to synchronize cache writes in a distributed system?

I am looking for a complete pattern implementing cache-aside when used in a distributed system across multiple nodes read/writing from/to cache. Specificly how to avoid making multiple requests to db ...
eran otzap's user avatar
1 vote
2 answers
172 views

Designing a microservice architecture

I am looking to enhance my skills in back-end technologies and would need your help in setting up a scalable microservices architecture. Here's my project. I have N sensors that send me data (Pressure,...
SkyBlue's user avatar
  • 11
1 vote
1 answer
116 views

Design considerations for data shared across multiple users: is Redis a good candidate?

I have an app that has an assets table like the following: user_id code current_price 1 ALUP11 12.5 2 ALUP11 11.9 user_id and code are unique together and current_price is updated if the user ...
Murilo Sitonio's user avatar
1 vote
4 answers
903 views

Microservices distributed lock mechanism

I am using spring boot with mongo db (azure cosmos db) in my microservices. Currently I have an Orders collection that stores Orders. These documents have a field userId that is null when the document ...
Andre Silva's user avatar
5 votes
1 answer
4k views

Best way to store quite large JSON objects?

I'm building an app where I need access to quite large reports about different publicly accessible URLs, JSON objects about 200kb to 500kB in size. Each user would generate hundreds of these reports ...
any_h's user avatar
  • 151
0 votes
1 answer
111 views

Sending and receiving results from microservices

I welcome everyone. I'm trying to understand microservice architecture. The task such: is 2 services. The first - for example, books rooms in a hotel. The second is something like a console interface ...
CrazyProgrammist's user avatar
-1 votes
1 answer
211 views

When does a REST API stops being one in terms of state management?

As far as I understand, there is no certain boundaries for the RESTness of an API. However, I would like your help to understand how large and long (in terms of running time) a caching or state ...
yokus's user avatar
  • 7
0 votes
2 answers
3k views

Simple Java Spring Boot Cache for multi-container system

I have a requirement to cache some static data as it is being consumed by our system. There is a static API that gives a map of records and we are fetching the corresponding record based on request. ...
Hindol Dey's user avatar
0 votes
1 answer
879 views

Scheduling asynchronous jobs with efficient round-robin algorithm using Redis

We are trying to redesign our microservice architecture-based application to support multiple tenants. We have a simple queue service that will be utilized by other services to queue any asynchronous ...
Raghu's user avatar
  • 101
-1 votes
2 answers
287 views

Should I make all my business logic depend on the data that comes from the cache?

One of my web services hits a few hundred thousand visits per day where most of the operations are CRUD and we are thinking to get a cache sitting in front of our SQL database. I have had implemented ...
parse's user avatar
  • 107
1 vote
1 answer
396 views

Exposing redis to external clients

We are building a system that runs on our cloud and that needs information from our clients network that must not be exposed openly. We have concluded that the only way this could work, is if our ...
T.S.'s user avatar
  • 113
3 votes
1 answer
2k views

Best strategy to flush Redis cache used in a distributed environment

Current setup: We follow the cache-first strategy right now. Always fetch from the cache first. If absent in cache, fetch from DB and update the cache. Cache TTL is 30 min. After this, the cache-key ...
YetAnotherBot's user avatar
0 votes
0 answers
63 views

Redis or MongoDB in Memory

I am working on processing of documents and storing their hash in Redis to identify duplicate records and some system files. Recently we migrated to MongoDB from SQL Server as our primary database. So ...
Anonymous Creator's user avatar
1 vote
1 answer
1k views

What performance benefits does a Redis cluster have over having all machines connect to a single Redis node? [closed]

Suppose I have data that easily fits in memory in a redis database. The redis server runs as a single service on a single process on a single machine. Let's say I have a 100 different machines connect ...
John_Krampf's user avatar
2 votes
1 answer
278 views

Event Driven Architecture how should channels be used

I'm using event driven architecture, to perform realtime signal proccessing and to provide independent metrics. I decided to use a redis cluster to act a cache and a message bus. I'm a bit confused ...
johnny 5's user avatar
  • 335
-2 votes
1 answer
106 views

What is the proper way to define a generic cron-job

Am going to handle a CRON job module which will be a generic module, on the job execution time shall I push the events to a queue so let the respective module will pick and do the respective operation....
ankithvicky's user avatar
1 vote
1 answer
3k views

Is it ok to use redis scan extensively?

In redis docs, it is stated that keys command should not be used in production, since it blocks other processes while executing, it is better to use scan iteration over all keys with some batch size. ...
ogbofjnr's user avatar
  • 121
1 vote
3 answers
4k views

Redis write-through cache vs write-behind cache (message queue?)

I have a simple use case: Newsfeeds aggregated based on posts that are linked to geopoints Users can comment on feed posts Users can like feed posts and comments I'm certain that Redis as a cache ...
Trace's user avatar
  • 185
7 votes
3 answers
1k views

Best way to reduce database writes?

I couldn't find a similar enough thread, so i'm making a new one. My question is about reducing database writes. Context is that I have an application which increments a number in a database every ...
Epic Speedy's user avatar
-1 votes
1 answer
116 views

Design review for a Cache aside system

I am maintaining a system where a list of string ids are stored against a container (using the term here as a generic entity) object. The database used is MySQL and the table structure looks like this....
DrunkOnBytes's user avatar
1 vote
2 answers
545 views

How do I decide an initial in-memory cache size given my DB size and expected load throughput?

(Purely for learning purposes) Say the DB contains 1 billion rows with 200 bytes per row = 200 GB of data. The traffic at peak is 1000 requests/s, with each request asking for one DB row. What cache ...
user2495123's user avatar
0 votes
1 answer
662 views

Caching or in-memory table in Azure for performance

I am building an Angular web application that retrieves part of its data from a Azure SQL Database table via APIs developed in Azure Functions (with Azure API Management at the API Gateway). The data ...
Tanmoy Sengupta's user avatar
1 vote
0 answers
201 views

Architect Java Hashmap Hierarchy to its equivalent in Redis Cache?

I have the following Job class representing runs of a job. I have a list of start and end times in Job class because the same Job can be rerun. public class Job { private final List<...
ThinkGeek's user avatar
  • 119
0 votes
1 answer
173 views

Key-value database for dynamic/changing keys

I have the following dataset: [234,565,678,90,66,7,8,44,5] [275,23,54,34,5] [4745,23,54,4,556,65,89,5,4,569,87,412] [75,273,59,5,4,567,412] [44,34,556,69,5,4,569,812] Each array represents a web ...
AlphaNumerical's user avatar
0 votes
0 answers
37 views

Recommendations for data clustering in an application

I am making a social media app. I have a use case in which i have to cluster similar type of data. For example, take Instagram. When a user likes a post, we get a notification that 'x likes your post'...
Gabriel's user avatar
0 votes
1 answer
104 views

Design decision of reading XLSX file at once or intermittently

I am working on converting an existing python based monolith solution to a microservice. The current flow is pretty straight forward: Accept XLSX as input -> Run some complex algorithms based on ...
Pro's user avatar
  • 163
1 vote
1 answer
134 views

Uncertain of cache solutions for CAD models

I am running a personal project of offering 3D model generation as a service (in this case CAD model). Since most of the generation of 3D models take a long time, I thought about using cache to ...
Gabriel Robaina's user avatar
0 votes
0 answers
57 views

Is it a good practice to store session in two different places?

I have a use case like this and I am wondering if this solution is a good practice or not. Say I have a website called dashboard.com and this is only for US region. When users login here, I am ...
theprogrammer's user avatar
2 votes
0 answers
133 views

Distributing tasks to several clients

I describe a very very simple scenario. I try to develop a system where many machines can help another one (server). I tried RabbitMQ and Redis, but both don't fulfil all requirements. I have 1-...
Daniel Stephens's user avatar
5 votes
1 answer
7k views

Using Redis as a cache in a Multi-Tenant application

I'm working on building a multi tenant application which relies on redis as a cache. I'm currently researching a feasible way to achieve multi tenancy with redis. I see that redis enterprise offers ...
Brad's user avatar
  • 425
4 votes
2 answers
2k views

Using distributed locks in microservice environment

I'm developing distributed system and trying to use best practices of microservice architecture. I was faced with a situation when I think I need something like distributed locks. Since I have not so ...
Alexander Bikkuzhin's user avatar
0 votes
0 answers
770 views

How to cache timestamp based key values with a distributed cache?

I have a dataset in a key value store (similar to Cassandra). The data model is - Key - ServiceName / timestamp_in_milliseconds value - operation In the write side I get some operations for a ...
ocwirk's user avatar
  • 101
2 votes
0 answers
106 views

Event Sourcing & Redis

I'm using StackExchange.Redis library, it seems perfect. Hard-coded events related BankAccount with ID 1: // UNSORTED COLLECTION public static List<Event> DomainEvents = new List<Event>()...
Alex Herman's user avatar
0 votes
0 answers
505 views

How to handle server side pagination + processing large sets of data

So lets say I have a SQL query made by a server that fetches up to thousands of records at a time and I need to display those records in a grid(similar to AG Grid) on the client for the user to review....
Aman Saran's user avatar
7 votes
3 answers
5k views

Different Redis instances for different microservices?

Say that we have Kubernetes running with n pods, each being a separate microservice. Now, some of those services need a caching layer. When we take into consideration: the fact that Redis was tested ...
Milan Velebit's user avatar
1 vote
1 answer
460 views

How to solve cache eviction when not using distributed cache in microservices?

Let's say we will not use distributed caching because we want that our microservices are independent and they do not have many single point of failures. Either we will have in-memory cache (simple ...
Mejmo's user avatar
  • 151
-2 votes
1 answer
258 views

Do I need a redis for caching object while MongoDB already cached frequently accessed items

I'm using mongodb for our web application. Recently I'm think of adding redis for caching objects which usually is the setting/configuration. But the mongodb already cached the frequently accessed ...
pcuong's user avatar
  • 97
1 vote
1 answer
4k views

Pros and Cons of using ASPNET.Core In-Memory Caching instead of Redis? [closed]

I know redis is a very robust caching solution and scales great, but when it comes to simpler non-enterprise websites I feel as if it's a bit too expensive (Azure Standard/C1: $100/m). I'm ...
Jorbyte's user avatar
  • 23
7 votes
1 answer
3k views

How is caching used within messaging apps?

I'm actually studying about web development. I was just asking why a lot of web apps and chats(Whatsapp, Telegram, Discord, and a lot, a lot more!) are using cache. I mean, after learning cache ...
DanielVip3's user avatar
1 vote
1 answer
3k views

How to store counters on Redis while minimizing potential data loss

The application I'm working on has a need to create a counter representing the number of times each piece of content has been viewed. There are two goals here: Update the counter in real time ...
max pleaner's user avatar
2 votes
1 answer
757 views

How to better scale reads in a website: to CQRS or not to CQRS?

The company i'm working for it's rewriting a legacy web application and we are evaluating the better architecture to get the job done. The business domain is quite simple: there are few entities, ...
Enrico Massone's user avatar
3 votes
1 answer
862 views

How to think about queries in NoSQL

I'm writing a project for school - Tinder-like app. I thought of implementing database entirely in RDBMS (PostgreSQL). But now I think it's a good opportunity to get to know NoSQL systems a bit. I'm ...
dreptak's user avatar
  • 41
5 votes
1 answer
8k views

Microservices - sharing data through distributed in-memory cache?

I'm fairly new to both microservices and shared in-memory databases like Redis. I'm wondering though if it would be a good idea to combine the two to address the challenges of data duplication, ...
TommyF's user avatar
  • 169
-3 votes
1 answer
691 views

Design the cache and search feature like hotel booking?

I need to design the feature like in encommerce(consider hotel booking site) we can enter the keyword/partial-keyword and need to return the relevant results. For Example :- If site admin or hotel ...
user3222249's user avatar
1 vote
1 answer
300 views

How to architect master/slave store/messages and de-duplication?

To clarify, as I'm not entirely sure how to summarise in the title. I have a redis cluster and a redis-backed scheduler (similar to sidekiq/resque, etc). My redis cluster has a master and a couple ...
user avatar
0 votes
1 answer
156 views

Architecture for distributed real time traffic capturing/viewer system

I have a scenario as following (you can think of it as a distributed Wireshark system): For a single capturing session, there are about 1 ~ 10 traffic capturing nodes distributed in a LAN network. ...
ricky's user avatar
  • 109
0 votes
1 answer
141 views

Where should I store statistics about sent emails?

my application sends a batch of custom emails every day using mailgun (an email API service). I have a producer worker scheduled to run daily, and all does is query the database for the unique ...
Tobias Fünke's user avatar