I think this is a book from the 1990s or 2000s. I read it in Russian, but I’m sure it was a translation from English or German. I don't remember the cover well, I think it was green and showed a group of characters in a cave.
The main character was a member of a race of small beings similar to hobbits or halflings. He lived on some island in the middle of the red sea (literally a sea of red water, not real Red sea), at first it seemed that it was blood, but then it turned out that the water was red because of algae or minerals. He worked in a library (perhaps at some academy or monastery) and at the beginning of the book his mentor(?) sends him to take a package to the port. There he is captured by a crew of dwarven pirates.
At first he is very scared, but then it turns out that these are good pirates who protect the island. The main character is friends with their captain and they go through a number of adventures together, I think there was definitely a battle with a sea serpent. But then he ends up with goblins who want to sell him into slavery in the big city. I don’t remember well what happened next, but in that city he joined a group of thieves and took part in the theft of something. I didn’t have time to finish reading and don’t know how the book ended.
The book also mentioned that in this world several hundred or thousand years ago there was a magical cataclysm caused by an evil figure similar to Sauron or Morgoth.