I just tried dynamodb example from amazon.
I understand the advantages on the db itself, but I found it uses http connection to write and read data.
If I have 1000 writes/sec, does that means I need have 1000 connections available to write? If so, isn’t it too heavy for a client server?
Is there any way to connect using TCP as normal db? Thanks.
You’re not opening a connection per say for each query, you’re making a request. Because you’re in a very high speed network inside amazon the latency is very low even with http. Sure TCP might be “Faster” but that’s just if you’re comparing the speed of connection in a non-real world. The real benefit that you get with HTTP is that you can scale it out very very easily. What they’ve done is added a few ms of latency on each request and in return they’ve guaranteed that the request will be less than 10ms. In their documentation they state that the response time they guarantee is single digit ms.
So sure HTTP is slow compared to TCP if you’re just comparing the protocol. But when you actually look at the product you’ll see its speed is far from slow, its probably one of the fastest databases that you can design when you start bringing large data sets into mind.