Is it possible to host the database on one server, but the actual data on another? [closed]
Solution 1:
There are three components here
- Flask, which is serving your REST API,
- mysqld, which is the running database instance, and
- the data files managed by that database instance.
There is no reason why Flask should share a server with the other two and plenty of good, Security reasons why it shouldn't. It will be perfectly happy, given the right ConnectionString to connect to a mysql instance running on another server.
This is probably the best place to "split" your architecture.
The database instance and its data files should be "close" to one another as possible, i.e. with as little as possible to "get in the way" and destabilise your database. (Indeed, I would go further and suggest that you should regard them as a single entity, the database, and forget about "files" completely).
Having a database server with attached disk devices is fine.
Solution 2:
Let me ask you a question - what do you think any SAN ever built is? A storage area network means that the data resides on another machine, purpose built for that. ISCSI is a protocol for exposing block based storage (i.e. virtual discs, not a file share). Why you think it exists?
So, the obvious answer is yes.