Don't screw around with the small, pen-sized pepper spray. Go to REI or Amazon and get a canister of Bear Spray. It fires a fog two feet in diameter up to twenty feet. I've used it while pedaling, catching the leader of a three dog group full in the face with a half second burst. Stopped them all in their tracks.
The next time I saw the group of dogs from that house, they took one look at me and dove for the ditches. They learned and they remembered. I've sprayed every dog that comes out onto the pavement after me, and I've never had any repeat offenders.