--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CAMmsnJhY-80K%2BhAGRFtdKQvGou%2BR3hqregA-QruB0uuBNLAVgQ%40mail.gmail.com.
The solution I've recommended as the most cloud native friendly solution is to offload that state to some in memory store like Infinispan or Redis. That way, you can scale your app independently from the state and it massively simplifies the notion of network config etc.
--On Fri, Nov 26, 2021 at 2:48 PM George Gastaldi <ggas...@redhat.com> wrote:Hey!--I have a scenario where I'm storing information in memory (a timestamp) in my application which is invalidated when an endpoint is hit. This works great when the application runs in a single pod/instance, but how can I make that work if I need to run multiple replicas? How can I make sure this information is updated across all replicas?I have a DB backend, but I'm afraid that querying the data on every request is not going to scale well. I could also query the data in a specific timeframe, but I wonder if there are better solutions for this.How is that problem solved in a microservices world? I'd love to hear your thoughts,Best Regards,
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CAMmsnJhY-80K%2BhAGRFtdKQvGou%2BR3hqregA-QruB0uuBNLAVgQ%40mail.gmail.com.
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CANYWk7MHp1wV82s1uv6sEGsoG8xLw7O2qSP4Yh-MAp4%2BRi8BgQ%40mail.gmail.com.
Remember a DB table can be created using an in-memory storage engine, so you can get the in-memory part for free and still access it via simple JDBC. This is useful if you already need a DB for other needs as well.You'd switch to Infinispan when a single node can no longer take the load.
On Fri, 26 Nov 2021, 14:05 Emmanuel Bernard, <eber...@redhat.com> wrote:The solution I've recommended as the most cloud native friendly solution is to offload that state to some in memory store like Infinispan or Redis. That way, you can scale your app independently from the state and it massively simplifies the notion of network config etc.+1Infinispan would be my favourite option as well, however if this is your only need a simple DB table might suffice.Remember a DB table can be created using an in-memory storage engine, so you can get the in-memory part for free and still access it via simple JDBC. This is useful if you already need a DB for other needs as well.You'd switch to Infinispan when a single node can no longer take the load.
----On Fri, Nov 26, 2021 at 2:48 PM George Gastaldi <ggas...@redhat.com> wrote:Hey!--I have a scenario where I'm storing information in memory (a timestamp) in my application which is invalidated when an endpoint is hit. This works great when the application runs in a single pod/instance, but how can I make that work if I need to run multiple replicas? How can I make sure this information is updated across all replicas?I have a DB backend, but I'm afraid that querying the data on every request is not going to scale well. I could also query the data in a specific timeframe, but I wonder if there are better solutions for this.How is that problem solved in a microservices world? I'd love to hear your thoughts,Best Regards,
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CAMmsnJhY-80K%2BhAGRFtdKQvGou%2BR3hqregA-QruB0uuBNLAVgQ%40mail.gmail.com.
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CANYWk7MHp1wV82s1uv6sEGsoG8xLw7O2qSP4Yh-MAp4%2BRi8BgQ%40mail.gmail.com.
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CAFm4XO2RdTsUYFLuwoMt379dcV6TmSuMHfNx0S%2Bxyteq1PxbKQ%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CAMmsnJhfOLJDZrsb0ScWPhuLcHOQXE7r%2BSY8FCVUBGFSfgfqpw%40mail.gmail.com.
On Fri, Nov 26, 2021 at 2:12 PM Sanne Grinovero <sa...@hibernate.org> wrote:On Fri, 26 Nov 2021, 14:05 Emmanuel Bernard, <eber...@redhat.com> wrote:The solution I've recommended as the most cloud native friendly solution is to offload that state to some in memory store like Infinispan or Redis. That way, you can scale your app independently from the state and it massively simplifies the notion of network config etc.+1Infinispan would be my favourite option as well, however if this is your only need a simple DB table might suffice.Remember a DB table can be created using an in-memory storage engine, so you can get the in-memory part for free and still access it via simple JDBC. This is useful if you already need a DB for other needs as well.You'd switch to Infinispan when a single node can no longer take the load.This is the same dilemma Cem and myself were looking at, as we need to have an option in OIDC to store the tokens not as cookies due to the cookie size restrictions.So we thought we'd start with a simple DB table and progress to using Infinispan (later in another extension) - my understanding was, with DB one can still make sure it works across multiple nodes (via the DB level configuration).
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CAMsYBfVacEZnuXWcHKAv%2BodE3a-v_HuW8WHhdjcRhMCc1spvjw%40mail.gmail.com.
Maybe i'm missing something here - we are talking about storing a single timestamp
and have it invalidated to know when it is necessary to go rebuild/refetch data
from a database that gets updated at irregular times.
A separate infinispan process which will be asked to run with 3 nodes too is
what we say is the solution for that ?
George, I would measure if that single query for a single value against the DB will even be detectable as a performance overhead.
/max
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CAFm4XO0XEQ3werHBfhU0pAJNdipFVp9K_Wd92HgVW_ZEJrZ42g%40mail.gmail.com.
/max
https://xam.dk/about
Maybe i'm missing something here - we are talking about storing a single timestamp
and have it invalidated to know when it is necessary to go rebuild/refetch data
from a database that gets updated at irregular times.A separate infinispan process which will be asked to run with 3 nodes too is
what we say is the solution for that ?
Hi,If that's all you need, indeed I wouldn't bother with a shared store: have each application instance store their own invalidation timestamps - assuming I understood correctly that you only want a time based expiry and don't need the ability to perform a synchronised invalidation.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CAFm4XO3CPprTr87bKqGTjw38aCXk_NAmSewGrXy%3DnQVjootNUw%40mail.gmail.com.
On Mon, Nov 29, 2021 at 2:26 PM Sanne Grinovero <sa...@hibernate.org> wrote:Hi,If that's all you need, indeed I wouldn't bother with a shared store: have each application instance store their own invalidation timestamps - assuming I understood correctly that you only want a time based expiry and don't need the ability to perform a synchronised invalidation.I think we need synchronized invalidation. A single (Maven) client request translates to multiple requests: the JSON artifact, the metadata.xml, the checksums. AFAIU, there is no guarantee all of them will be handled by a single instance of the app.
On Mon, Nov 29, 2021 at 2:26 PM Sanne Grinovero <sa...@hibernate.org> wrote:Hi,If that's all you need, indeed I wouldn't bother with a shared store: have each application instance store their own invalidation timestamps - assuming I understood correctly that you only want a time based expiry and don't need the ability to perform a synchronised invalidation.I think we need synchronized invalidation. A single (Maven) client request translates to multiple requests: the JSON artifact, the metadata.xml, the checksums. AFAIU, there is no guarantee all of them will be handled by a single instance of the app.
--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CAMmsnJiOiLmWdtwADTmDGQYhvWxn3_t2xZAx7qke_6n1ppsNwA%40mail.gmail.com.
A bit late to the party but I think you're presuming a bit too much of how much of a problem it will be to do a simple indexed query on a database.My advice would be: just use the PostgreSQL database and only consider something else if it becomes an issue (and I'm pretty sure it won't).
--On Mon, Nov 29, 2021 at 2:35 PM George Gastaldi <ggas...@redhat.com> wrote:--On Mon, Nov 29, 2021 at 10:30 AM Alexey Loubyansky <alexey.l...@redhat.com> wrote:On Mon, Nov 29, 2021 at 2:26 PM Sanne Grinovero <sa...@hibernate.org> wrote:Hi,If that's all you need, indeed I wouldn't bother with a shared store: have each application instance store their own invalidation timestamps - assuming I understood correctly that you only want a time based expiry and don't need the ability to perform a synchronised invalidation.I think we need synchronized invalidation. A single (Maven) client request translates to multiple requests: the JSON artifact, the metadata.xml, the checksums. AFAIU, there is no guarantee all of them will be handled by a single instance of the app.Exactly, this is the use case I'm facing at the moment.
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CAMmsnJiOiLmWdtwADTmDGQYhvWxn3_t2xZAx7qke_6n1ppsNwA%40mail.gmail.com.
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CALt0%2Bo_n4v8tHuo2K99Q-cqpE64PKJt%2BFdVwiWNh4Mf%3Dqw5A3Q%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CALt0%2Bo_n4v8tHuo2K99Q-cqpE64PKJt%2BFdVwiWNh4Mf%3Dqw5A3Q%40mail.gmail.com.
So you're saying to perform indexed queries directly in the database (on every request) without caching anything in the application side?
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CAMmsnJhxjEu%2BgCS3MAKmOmbd7VH8ZJo-PR7mx1zDd3237KROoQ%40mail.gmail.com.