How do I decide what web server to use?

Your database choice should be based on the data, not the perceived ease with which you can slap whatever you want in to it.

Mongo is good because APIs use JSON format most often. So... based on the data, it makes sense to use Mongo.

Mongo is basically never the actual right choice.

Right. Because Google and many many other major corporations who hire competent developers are making the wrong choice for their subsidiary applications.

In reality, you're way over representing relational databases. MySQL is great at handling complex transactions amongst many tables. But if you suddenly want to partition your datatypes, you're shit out of luck.

Here's an excerpt from StackedOverflow regarding this:

"A good example for horizontal scaling is Cassandra , MongoDB .. and a good example for vertical scaling is MySQL - Amazon RDS (The cloud version of MySQL). It provides an easy way to scale vertically by switching from small to bigger machines. This process often involves downtime."

What if the API doesn't use Json as the serialized format?

Then don't use a database that natively stored JSON documents. In this case, use a different relational or non-relational DB.

/r/learnprogramming Thread Parent