In my experience , the dragons may randomly appear in any of the above-mentioned locations but the % chance of appearance is different depending on where you are and what stage of the main quest you have completed.
I had dragon attacks inside Windhelm(once) , Whiterun(once) , Markarth(twice) , Riften(3-4 times) , and Solitude(3-4) before completing the main quest at level 81.(200+ total dragons killed)
Dragon attacks still occur elsewhere but none in the major cities since then.
As an experiment, I made a save at a point when there had been no attacks for a while and a new one was due.
Fast-traveled INTO Riften 3 times , reverting to save afterward , and no dragons appeared.
Fast-traveled to Riften`s Stables instead and dragon spawned 2 out of 3 times.
Personally convinced that dragon attacks after f-t INSIDE walled cities have a lesser chance of occuring than in places like Falkreath , Dawnstar , and the College of Winterhold.
News on the 1.9 update says dragon attack frequency after fast-travel will be reduced after completing the main quest but doesn`t say how much.
When I know a dragon attack is eminent due to peaceful passage of time and I want to visit a particular spot without the hassle , I now f-t to Falkreath first where a dragon will almost surely appear.
All the outside NPC there except the respawning Guards are long ago dead and i just hide at Lod`s empty forge and watch the guards kill the dragon before moving on to my planned destination.