Use schedule-based autoscaling to do everything except autoscaling
For the Impatient: Skip section
Context
Oracle Cloud Infrastructure recently announced schedule-based autoscaling for compute instances maximizing the cost-saving proposition as it built on per-second-billing and the flexibility of Universal Credits.
1. Scedule based autoscaling
2. Per-Second Billing
3. Universal Credits
Long Story Short
Use Schedule based autoscaler on an instance pool of size = 1
Just follow the routine to create an autoscaling policy


Use Schedule based autoscaling
Refer to Quartz Cron Expressions
Don't change the pool size
Let it stay at "1" if it is 1.
Instead of metrics-based autoscaling, use schedule-based autoscaling. and make sure your schedule based policies don’t change the instance pool size. i.e. you trigger an event but not for autoscaling but for something else.


1) Autoscaling generates an "ScalingEvent" event action
2) Event Action can be processed by Events Service
3) Events Service can trigger Functions
4) Functions become your Actuation layer

Use Attribute filters for Routing

What if I wanted a bigger Contraption
Once the data moves to the actuation layer, Function calls get decoupled from one another using Notifications/ Streaming.
Streaming - would have data published to it by Functions, but have to be read by a group of consumers periodically, which can also be a scheduled autoscaling policy triggered function that reads from the stream every “1m”Notifications - We could have functions publish to a bunch of notifications that simply trigger functions on Notification publish. But limited to 60 events per minute per topic.
Extend the contraption
Functions are my actuation layer, i.e. short-lived, ephemeral programs, that can leverage massive parallelism but I would like to break up a large task into small tasks using a Fan-Out Logic. Fundamental problems with this approach are having someone maintain state.
Maintain State through the Task Pipeline
Fan-Out & Micro-Batch
A single function could decide how many functions if would like to call and publish a proportionate number of Notifications. Publish to multiple topics which have the same function as the trigger action to overcome the 60 events per minute limitation too. The idea is to have state maintained in Streaming or in a database service like NoSQL database
Leverage the Power of Cron
The CRON Expression is the logic.
https://www.freeformatter.com/cron-expression-generator-quartz.html
More Power to you with
Events
Functions
Streaming
Notifications