In the current project, it was necessary to implement locks between potentially spaced instances. At the moment, the Redis + Redisson bundle is selected, but it barely took off (with a large number of locks, performance dropped as expected + locks were lost, as a result, the most intense section was transferred to the implementation from Set, and only after that everything became more or less sanity, plus this implementation does not imply scaling Redis). Are there alternative reliable implementations?

    1 answer 1

    You need a distributed lock implementation, if I understand correctly. Then look at one of the following: Apache Zookeeper, Netflix Eureka, Aapche Ignite, Hazelcast.

    If you are already using RDBMS, you can use locks on transactions. But this is fraught with a drop in the performance of the DBMS itself with a large number of such locks.

    • Yes, the previous implementation was on a DBMS, but either I failed the moron exam, or the hibernation failed, but in the simplest test of getting the service up, I managed to snatch two identical entities with queries, despite the fact that exceptions about optimistic lok did appear , caught and processed as they should. Specifically, this service is not supposed to be completely armor-piercing, there is hardly ever over a hundred rps per cluster will be over. - etki