Such traveller's inn dotted trade routes covering Asia, North Africa, and South-Eastern Europe from 16th century onwards. Reportedly about thousand serais were built along the silk route. With the advent of modern means of transportations and advent of hotels these felt into disrepair.
Caravanserais not only provided accommodation and basic amenities to men and animal but also supported the flow of commerce. Besides residential quarters the serais also had bazaar (market) within their precinct. Typically these were square or rectangular high walled buildings with a single entrance wide enough to permit heavily laden camels to enter. The courtyard was almost always open to the sky, and the inside walls of the enclosure were outfitted with a number of identical stalls, bays, niches, or chambers to accommodate merchants and their servants, animals, and merchandise.
One of the oldest caravanserai is at Maranjab, which lies 160 kms south of Tehran on the southern shore of Lake Qom aka Daryacheh-ye Namak (a dried salt lake), in Isfahan Province, Iran. Like other caravanserais of the period it also got in a bad shape but in Year 2000 it was repaired and restored to its earlier glory and is a tourist spot now.
More and larger images can be seen at http://www.yazdpara.com
View photo gallery at http://www.mountaindeserttours.com