It's mentioned that the "projected cost" logic outgrew Rails, but there's no mention of what that microservice eventually wound up running. I'm curious what you had success with.
The cost structure service is actually what I've been working on recently. We spun up a fairly lightweight flask service (on our kubernetes cluster) that is capable of serving the cost structure to the rails app and for analysis. At its core, it uses a small DAG library we wrote, and on top of that has a migration framework that can represent cost structure changes over time as distinct versions that can be served simultaneously.