I am developing a couple of web services – one to BUY a product and another to VALIDATE a product. Multiple clients will be calling the BUY (around 250/sec) and same for VALIDATE.
They need to query and update a tabular data structure before calling the backend.
I have a feeling that using a relational database table like Oracle to maintain this common data structure will slow down things because of network latency (assuming database and queries are tuned optimally). I have been proposed EhCache and Hazelcast but I prefer using a database table because I know it better.
Can anyone confirm if hitting a database across a network could prove to be a bottleneck for an application that’s supposed to serve 250-300 transactions per second?
Certainly we are okay if the server instance goes down and we lose the in-memory representation of the data structure.
IMO, caching will help just if the update requests is lower than the query request… imagine you cache as a big map that will store values already queried if you update every time rows on server you need to update the too, and you update the cache by invalidating its entry in order to perform request to the DB again.