weidazhao / Hosting

Hosting prototype
170 stars 35 forks source link

Not really an issue more of a request #12

Closed undecided2013 closed 8 years ago

undecided2013 commented 8 years ago

First, I've been reading up on Service Fabric Partitioning. I am more interested in the partitioning of Stateful services. This project contains three services and I do not see any explicit partitioning code or configuration in them. Can the gateway service be partitioned? It sounds like having one instance of it will be detrimental to the scaling of this (or other offshoots of this) application. Same goes for sms. What changes are needed to perhaps partition it by user name? I appreciate your work on this. Looks great so far.

weidazhao commented 8 years ago

Glad to hear you like it! Partitioning is defined in ApplicationManifest.xml: https://github.com/weidazhao/Hosting/blob/dotnetcli/Hosting/ApplicationPackageRoot/ApplicationManifest.xml. Depending on the deployment environment (local dev/production in cloud), you can use a different set of parameters. Check out https://github.com/weidazhao/Hosting/tree/dotnetcli/Hosting/ApplicationParameters.

Gateway service is a stateless service so it can be partitioned only with SinglePartition scheme. When the gateway service is deployed to cloud, each node (means VM now) of a cluster should have one instance of gateway (InstanceCount = -1).