Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4071508
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T16:45:58+00:00 2026-05-20T16:45:58+00:00

If you were to design a transparent SMTP proxy in C# (.net 4) to

  • 0

If you were to design a transparent SMTP proxy in C# (.net 4) to meet the following initial requirements

  • Scales well
  • Logs all traffic to a
    database
  • Can be extended easily say for virus scanning attachments

Considering these factors broadly speaking how would your design look? Would you create Listener, Sender and logger concrete classes or something more abstract? And would you use callbacks, threads or processes and why?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T16:45:58+00:00Added an answer on May 20, 2026 at 4:45 pm

    This is a non-trivial application. Some ideas that should help:

    SMTP Scalability

    In general, scaling network application means being able to scale out (as in more machines) rather than up (a bigger expensive machine). This means being able to have multiple servers be able to handle SMTP requests. Note that this will likely need to have support at the network level (routers that can distribute messages to an ‘SMTP farm’).

    Yes, to make an SMTP scale and peform, you’ll likely want to utilize multiple threads (likely from some sort of thread pool). Note that a multithreaded sockets implementation is not trivial.

    In terms of processes, I think one process (likely a Windows Service) with multiple threads for each SMTP server is a good way to go.

    Database Scalability

    Keep in mind that the database can be a scalability bottleneck as well. To design for large loads, you would want to be able to horizontally scale your data tier as well. That means being able write to more than one db server. That leads to being able to report from a set of database servers (which is much more complicated than reporting from one).

    SMTP Reliability

    Is this a concern / requirement? If so, this is another reason for supporting a farm (well, if we have multiple server for reliability we might call it a cluster) of servers instead of just one. Note that the farm would have to have a way of letting the cluster know that it has failed (through some sort of heartbeat mechanism perhaps).

    Database Reliability

    To make the database reliable, you would have to do some clustering as well. This is neither cheap or trivial (but has been done a number of times with a number of database platforms).

    Queuing

    One way to handle surges in server load is to queue messages. This way, the server can keep passing messages through, but you’re not waiting for the chain of extensible modules to finish their processing. Note that this adds another layer of complexity and a point of failure to the system.

    Extensibility

    One way to approach adding functionality such as database logging and attachment scanning is to add a chain of “MessageInsepctors” or “MessageHandlers”. You would probably want to allow configuration of these in a particular order (e.g. virus scan before logging so you don’t log infected items).

    Another aspect to consider is which plug ins can block a message from passing through (such as a virus scanner) and a plug in that can execute after the message has passed (logging).

    In terms of adding the plug in support, you could use something like MEF (Managed Extensibility Framework).

    Reinventing the Wheel

    Putting all of this functionality into place would take a considerable amount of development time. It might be cheaper / faster / easier to just purchase a solution off the shelf that does all of this for you (this problem has already been solved a number of times).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Coming from more low-level languages like C++, and seeing how transparent .NET memory management
I have an interesting design problem and I was hoping you all could make
I have a complex vertical nav which includes transparent PNG's in my design. I
I am using the following html markup and css code to design my landing
Design requirement: Show a list of items the user can pick from After having
Design wise and performance wise which approach is recommended for handling multiple Zeromq sockets
Design an algorithm that, given a list of n elements in an array, finds
Design of SQL Table Users: Columns: ID(Primary Key), Name, Age, Zip. I am displaying
oo design basics here... Edit: To clarify after first answer - I'm not asking
My design requires that I kill the get_configuration activity (Activity1) once the second_activity is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.