Skip to content

Commit e7fb6a9

Browse files
committed
Update README.md
Add info about server-database round-trips.
1 parent aff6c4d commit e7fb6a9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,12 @@ Lock the entire resource pessimistically or optimistically (by reading version n
2727
3. **Save resource** to database. Release the pessimistic lock. Or run
2828
atomic update with version check (optimistic lock).
2929

30-
But such architecture does not scale well if number of requests
30+
But such architecture does not scale well if the number of requests
3131
for a single resource is very high
3232
(meaning hundreds or thousands of requests per second).
3333
The lock contention in such case is very high and database is significantly
34-
overloaded. Practically, the number of concurrent requests is limited.
34+
overloaded. Also, round-trips between application server and database add latency.
35+
Practically, the number of concurrent requests is severely limited.
3536

3637
One solution to this problem is to reduce the number of costly operations.
3738
Because a single resource is loaded and saved thousands of times per second

0 commit comments

Comments
 (0)