Pepper spray, if you have it, gives you another option.
There is some slight danger of not escalating enough or not taking a situation seriously enough, in essence not realizing your in deep poop when you are and then too late showing up to 'gunfight with a knife'. Or pepper spray, as the case may be. The reflexive tendency of too many is to immediately escalate to lethal force, while claiming to playing it safe.
If you do carry pepper spray you need to be aware of its limitations and aware of the situation in ways most don't often pay much attention to. Like the direction of the wind. Or getting enough room to get at least arms length away before you spray and room to maintain twice that once you spray. Being aware of this, and taking steps to maintain distance and upwind in a situation should be automatic if you carry spray.
Sidestepping can be at least as, if not more, effective as a way of maintaining a safe distance. Virtually anything might be used to help maintain separation. A chair bench, broom or mop can be used to fend off a person. Getting on the other side of a vehicle or even a low wall is good. On the street staying on the opposite side of a lamp post or sign.
My tendency is to keep facing the attacker. Maintaining some control and awareness. Backing off or sidestepping as needed. If you run your giving up a lot of ability to influence the outcome.
IMHO if your going to use pepper spray I wouldn't warn the person that they will get sprayed. Or let them know you have pepper spray. I think this gives up the advantage of surprise and gives the attacker a chance to brace themselves and/or modify their tactics to neutralize your defense.
When the critical moment comes whip out the spray and spray accurately and thoroughly. Lay it on heavy. This is going to be easier if you have practiced. Some spray manufacturers sell practice sprays that match the performance of their regular version. I would advise everyone who carries spray to use these to practice with as often as possible.
In selecting pepper spray I would get it as strong a version as practical. The spray pattern to get is up to you. Tight streams have to be aimed and anything that misses the face is pretty much wasted. You can run out of spray before hitting the target. And the time it takes to get it on target allows countermeasures. Thugs aware of pepper sprays often know to turn away, cover the face with a shirt or anything handy and attempt to rapidly close with and grapple with anyone spraying them.
Wide sprays can get you an effective hit faster. But anything but a direct hit won't be as effective as a square hit from a concentrated stream. Possibly more importantly a wide spray with small droplets or aerosol can blow back on you. Making your awareness of the wind and keeping upwind even more critical.
Also where you might use it can make a difference. An aerosol used in a small room can effect everyone in the space. A good spray of strong OC spray can make a fairly large room uninhabitable for a good amount of time. A small leak can make a vehicle impossible to drive if your unwilling to drive with your head out the window. Unless the can is intended for emergency use it pays to keep any cans of spray your transporting in a vehicle sealed in plastic bags. Ideally the primary zip-lock is rolled in a thick towel and stuffed in a trash bag. This gives the spray somewhere to go.
Choosing a spray I would get the largest bottle I could comfortably carry and get one with a dye. Sprayed with a UV activated dye means that sticking around makes them more vulnerable to be caught by the police. This may or may not persuade them to break off any pursuit. At the very least they are out some clothes. The down side is that if it leaks or you spray innocent bystanders you may be buying replacement clothing. Some dyes will wash out of clothes but not off of skin. Some permanently stain clothes.
Personally I like having pepper spray, a stun gun and a collapsible baton handy. An appropriate firearm completes the picture. IMO non-lethal defense means you can intervene earlier and more confidently in marginally threatening situations. It gives you more options.