My system works like following:
Server will receive an adrequest comprising one or more impressions/ads,
for each impression/ad I have to execute some CPU processing stufff like
targeting etc consuming approximately 5-15ms.
Then for each impression/ad I will be making an upstream call to another
webserver to fetch some related details.
After this IO is done, for each impression/ad I will be selecting winning
creative whichh may again consume CPU of 5-10ms per impression/ad.
& finally I will be writing the response.
MY machine configuration would be typically: 16 cores, 32 GB
How the processing pipelines for such typical system will look like?
I want to exploit full parallelism but at the same time the scheduling of
Goroutines should be minimum.
For handling CPU processing what is best strategy? Continue to do
processing for all impressions/ads in single Goroutine or fork a separate
one for each impression/ad?
For handling IO I think I can fork one Goroutine for each call to be made.
I have been checking the Concurrent Design Patterns in Golang & found
something here: http://blog.golang.org/pipelines
So shall I go for 3 Goroutine worker pools one for preprocessing of
request, one for making external IO calls & one for postprocessing &
synchronize execution between them through channels?
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to email@example.com.
For more options, visit https://groups.google.com/d/optout.