Ultimately there has to be a source of truth somewhere, and geographically scaling a DB is difficult (CAP theorem and all that). Running your code at the edge doesn't help much if it still has to talk to a database far away to actually produce a response.