The cost of living point is very valid. A great salary in Hanoi is most likely to be a very low wage in San Francisco. You can't expect an employer to pay way above the local market rate for a position. Bottom line, they will always find someone to work if they offer a bit above the local market rates. The salary, whatever miles away makes no difference.
As far as how to deal with it, look a round you I bet your salary is a very good wage for the area you live in. If not then find a job with a local company that pays better. Software developers get paid well all over the world relative to where they live.
BTW, even with the wages in Silicon Valley, most developers there can't afford a house close to where they work. Inability to buy a house with local wages is a common problem in the big cities of the world so it's not an issue related to your area alone.
As far as how to deal with it, look a round you I bet your salary is a very good wage for the area you live in. If not then find a job with a local company that pays better. Software developers get paid well all over the world relative to where they live.
BTW, even with the wages in Silicon Valley, most developers there can't afford a house close to where they work. Inability to buy a house with local wages is a common problem in the big cities of the world so it's not an issue related to your area alone.