64 位 Amazon 实例上的 32 位 ASP.NET 应用程序
我有一个用 asp.net mvc2 编写的 Web 应用程序。目前在 amazon ec2 32 位介质实例上运行。由于流量巨大,我们希望设置多个实例。但在此之前我们想要在 64 位实例上运行应用程序。
有什么建议、概念证明、障碍等吗?
I have an web application which is written in asp.net mvc2. Currently running on amazon ec2 32 bit medium instance. Because of huge traffic we want setup multiple instance. But before this we want to run application on 64 bit instance.
Any recommendation, proof of concepts, roadblocks etc?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
由于这是 64 位 Windows,因此您还将拥有一个 64 位 IIS 实例。如果您有任何使用不太常见组件(例如 Mono)的第三方库,您可能需要从源代码重新编译它们或进行一些更改。例如,当我们开始在 64 位 IIS 中托管时,我们遇到了这个问题
:运行 ServiceStack 示例。
如果您的应用程序全部是 .NET 并且您没有使用使用本机代码的库,那么这对您来说可能不会是太大的问题。
您还可以将 IIS 工作进程作为 32 位应用程序运行,因此即使遇到问题,它也应该非常即插即用:http://forums.asp.net/p/1156811/1901796.aspx
我最近将一堆 32 位 IIS 主机切换到 64 位,并没有太多问题。
Since this will be 64 bit windows, you will also have a 64 bit IIS instance. If you have any third party libraries that use less common components (like Mono), you might need to recompile them from source or make some changes. For instance, we ran into this when we started hosting in 64 bit IIS:
System.BadImageFormatException on running ServiceStack examples.
This probably won't be too much of an issue for you if your app is all .NET and you aren't using libraries that use native code.
You can also run IIS worker processes as 32 bit applications, so it should be very plug and play even if you run into issues: http://forums.asp.net/p/1156811/1901796.aspx
I recently switched a bunch of 32 bit IIS hosts to 64 bit and there weren't too many issues.
有几件事需要检查,但大多数情况下它应该可以工作:
IntPtr
而不是Int32
地址。我想人们在切换到 64 位时提到的另一件事是他们认为出了问题,因为应用程序使用的内存比 32 位时更多。这通常是由“指针膨胀”引起的。地址现在是 64 位宽,而不是 32 位。
在其他一些更极端的情况下,由于 x64 和 x86 .NET Framework 具有不同的 JITers,因此 x64 的优化方式不同,并且可能会损害性能而不是提高性能。如果不打补丁,这对于 .NET Framework 2.0 来说是一个更大的问题。
There are a few things to check, but mostly it should just work:
IntPtr
instead ofInt32
in the case of addresses.I supose one other thing that people mention when switch to 64-bit is they think something is wrong because the Application is using more memory than it did when it was 32-bit. This is often caused by "pointer bloat". Addresses are now 64-bits wide as oppose to 32-bit.
In some other more extreme cases, since the x64 and x86 .NET Framework have different JITers, the x64 is optimized differently, and can hurt performance rather than improve. This was a larger problem for the .NET Framework 2.0 when left unpatched.