WCF services in an N-Tier service based system is very useful, but is dependant on appropriate design. Im currently in the process of re-designing a processing system. On initial deployment and for 18 months after the system could cope with the load. but not any more, and I'm faced with a full architecture change.
So a few thoughts on designing scalable systems, 1 if you have heavy critical processes in the chain consider the use of msmq with throttling to manage load on these processes. The same can be said for external system dependancies, technology like msmq can help.
Don't poll production databases to look for specific data. This is obvious i know, but I see so many ideas flawed by this approach. Try instead to use a push system to handle such requirements.
Load balancing, ideally design your architecture to allow load balancing, obviously small systems don't require this, but enterprise level applications should support it, even if its not going to be used straight away, at least its an option. Using IIS to host the services is an obvious way to do this.
Hindsight is always 20-20 :)
ReplyDeleteIIS clustering is a really simple way to achieve this, as you've pointed out, though it slightly changes the dynamic of the service you're running. IIS will cycle and kill the app pools so be careful with what and when you cache data.
MSMQ has some advantages but adds extra complexity to design. Database queuing is often more reliable up until MSMQ4, however some of the msmq4 poison message handling / retry handling stuff is awesome. Obviously forcing msmq means that everything ends up async, which often isn't ideal as you end up with overly complex chains of message queues in a situation where a database actually does better to keep track of state over dropping messages from queue to queue.
Also worth looking into the circuit breaker pattern for controlling connections to external systems that need to cope with downtime.
Polling for events is always a road to destruction (and I fully recognise the irony of pointing this out now ;) ).
Just some thoughts, sounds like fun times.
- D