We're currently investigating the use of Amazon SWF to take care of the longer running jobs in our backend. Our architecture consists of the typical stack:
client (web/android/iOS)
----
API/Worker (Elastic Beanstalk)
----
DB (RDS)
I would like to know what would be the best place to put the SWF-decider logic. A separate EC2 instance, inside the API component, or would it make sense to separate it in another EBS-worker?
You can deploy your deciders to the same EC2 instances as your activity workers. However, I would not recommend deploying the API service and all the workers to the same instances.
In case of a spike in your workflows your SWF workers could scale independently of your API service and vice versa.
I think creating a separate Bean Stalk Configuration for your workers would make sense.