SBarnes wrote:By this I would assume you have the API running as an API app or possibly a web app but how are things configured in terms of where Jiwa itself and where the database is sitting as I would assume you have everything sitting in Azure and not some sort of hybrid solution?
It's what they call an App Service which is really just an IIS site - It's a low cost option (or free, even - if you don't mind using an azurewebsites.* domain name). We use the Shared pricing tier ($15 per month) which lets us use a custom domain (api.jiwa.com.au) - soon we'll need to bump that another tier when we deploy with SSL - the costs and features of each pricing tier are outlined on the
Azure pricing page.
Our SQL database is also in Azure, but it does not need to be - however latency between the app service and the SQL server should be kept down, so it makes sense to have a SQL database in Azure also. When I say the SQL database is in Azure, I mean it's an Azure SQL Server, not a VM running SQL Server - so it's true database-as-a-service, which has lots of nice features like automatic backups every few minutes and automatic replication across 3 fault zones with automatic failover, and the option of georedundancy (replicating to another Azure DC in real-time, and again with automatic failover).
There's nothing stopping you pointing the Azure app service to an on-premise SQL server, or one in another cloud such as AWS -
the configuration file just needs to know the DNS or IP address of the SQL server to reach it - but I reiterate my earlier point about latency - you're going to be talking tens of milliseconds for each database query when not in the same physical location compared to sub-millisecond responses when they are in the same physical location.
We provide all the assemblies the App service needs to run - it contains the Jiwa assemblies (as well as all other related assemblies, such as ServiceStack) - they get deployed to the App Service and it all magically works. The only thing you need to do is edit the config file to provide the SQL Server address, the database name and the Jiwa credentials to use on initial startup - and you can edit that file by adding your own set of FTP credentials to the Azure App Service, downloading the App.config file with an FTP client, editing it and uploading it back up to the Azure App Service.
The 3 options we provide for hosting the REST API are:
- Self hosted (windows service) (on-premise, VPS, hosted dedicated server, VM)
- IIS Site (on-premise, VPS, hosted dedicated server, VM)
- Azure App Service
Where you put the Self hosted or IIS is up to you - but with latency in mind the options will narrow down quickly based on the location of the SQL Server.
Hope that helps!