This happened to me at night in Istanbul 10 years ago. I was walking down a side street and a pack of 5-6 dogs noticed me and began to follow me. At first they were tentative, but increasingly the bolder ones in the group closed the distance. I began moving more quickly, but stepping backward, facing the dogs.
They clearly had violence on their minds. By the time I was approaching a well-lit main street, I had been lunged at a dozen times, with each dog only thinking better of it at the last instant.
I only had a backpack which I could use as a blunt weapon, and if the other dogs joined in following a strike from one of the boldest, I was not at all confident in the outcome. Easily one of the scariest experiences of my life.