Terrible performances using a remote Azure SQL Database
Solution 1:
Seems reasonable. Especially if the inserts are being run in serial. Breaking it down:
Say there's 30ms RTT between the app and db server. Since SQLServer is an ACID compliant database, and the database driver honors this, the theoretical maximum amount of TPS is 33 per second as the driver will block until it receives an ACK from the database. (1000ms / 30ms = ~33 TPS)
You are achieving around 83 TPS, so I'm guessing the latency between the app server and the db is around 12ms.
On the local server, you probably have sub millisecond timings.
Remote databases are just a bad idea. But if you have to do it, try to batch operations into a single transaction as you can pack more data into a RTT hop. With that said, it means a failure is much more expensive (retrying 1 insert vs retrying all 100). Take it all into consideration, but anything you can do to reduce latency (or increase parallelism) will make a substantial difference.