0

I have 2 instances of MySQL databases and they are being handled by Load Balancer. Now Spring application contacts load balancer with great amount of requests. Some transactions are locking one row in database (exclusive). In some occasions deadlock occurs when I send for example 100 requests in 1 second. Does anybody know what can cause that deadlock? Of course deadlock occurs only when I send the same request that locks same row in database.

enter image description here

This is how system looks now.

PaulNUK
  • 4,774
  • 2
  • 30
  • 58
alxbxbx
  • 313
  • 1
  • 5
  • 18

1 Answers1

0

Apparently synchronization of two databases is not a wise idea when you have big load of requests. So better go with one DB, and let the other be "slave". Best strategy in this situation is Failover, which I used.

With multiple instances of application, there is no problem of replication. But with database, synchronization is great problem. So as @Tim Biegeleisen said, it's better to use single database.

alxbxbx
  • 313
  • 1
  • 5
  • 18