问题
I am trying to decide what stack to use for a new web based backoffice system. We develop in C# and are going to use ServiceStack and/or ASP.NET MVC. Our customer prefers hosting on a Linux server, so this rules out MVC4 as this is not supported by Mono.
Additionally we are worried about the state of the mono-fastcgi-server needed to run ASP.NET on Mono because of posts like this https://serverfault.com/questions/330298/stopping-fastcgi-mono-server-gracefully-website-content-updating-with-no-need-t and because we find it very hard to find relevant and up to date information about the state of the project. Therefore we hesitate to use MVC3 on mono as well.
Right now we are considering using ServiceStack (with the new Razor views !) hosted in a console app behind and NGINX reverse proxy. This seems work fine and the ServiceStack documentation indicates that this is a viable solution. But what about Mono? Is it stable enough for serious production sites and services, is the garbage collector performant etc? Does anyone have up to date experience with hosting busy server apps (console apps using httplistener) on mono - if so, how does it work, would you recommend it? what version of mono did you use?
Our alternative is to force our customer to accept a windows server, and then we will use service stack or perhaps mvc4 combined with service stack.
So to sum up, what would you do/consider and what are your experiences with hosting servers apps on mono?
回答1:
ServiceStack.net has always run on Linux/Mono
Note all live demos hosted on servicestack.net are running on an Ubuntu linux vServer. servicestack.net has always been hosted on Linux/Mono for years, in-fact before moving to an Ubuntu vServer from hetzner our old CentOS server had an up-time of 480 days. We consider Mono an increasingly important platform to support as we expect the advent of linux-only clouds to be an important competitive advantage since it allows you to scale at $0 software licensing cost.
Developing on Windows with VS.NET and deploying to Mono/Linux
For all of ServiceStack live demos we develop on Windows with VS.NET but we git-deploy and build and host on Linux. As outlined in our Release Notes we take special care to support Mono as a first-class citizen where we apply normalizing behaviour as much as possible so porting an existing IIS/ASP.NET site remains trivial (i.e. you should be able to copy and run the binaries as-is!) - this extends to the external dependencies we adopt which are influenced by their support of Mono.
All demos including the Razor Live demo is hosted on Mono/Linux
All ServiceStack demos are hosted on Linux, this includes the Razor example which has 2 versions deployed and hosted on Mono, i.e.
- razor.servicestack.net - ASP.NET Hosted live demo powered by Linux / Nginx / MonoFastCGI
- razor-console.servicestack.net - Self-Hosted Console App hosted behind Nginx Reverse Proxy
You may want to look at this question for different ways to host ServiceStack on Linux.
来源:https://stackoverflow.com/questions/12556081/host-servicestack-mvc3-or-mvc4-on-mono-or-windows-and-what-is-the-state-of-mono