I'm trying to learn how socket module works and I have a dumb question:
Where is socket.send()'s sent data stored before being cleared by socket.recv()?. 
I believe there must be a buffer somewhere in the middle awaiting for socket.recv() calls to pull this data out.
I just made a test with a server which sent a lot of data at once, and then connected to a client that (intentionally) pulled data very slowly. The final result was that data was sent within a fraction of a second and, on the other side, it was entirely received in small chunks of 10 bytes .recv(10), which took 20 seconds long .
Where has this data been stored meanwhile??, what is the default size of this buffer?, how can it be accessed and modified? 
thanks.
The OS (kernel) buffers the data.
On Linux the buffer size parameters may be accessed through the /proc interface. See man 7 socket for more details (towards the end.)
Trying to understand buffering in Python socket module