Is it possible to have a single canister serve the frontend via http_request query function and provide the backend methods at the same time?
So can we have single canister app that stores both the frontend assets and the backend logic and data?
Ps: The IC is amazing
Yeah you can, but there are benefits of a multi-canister approach:
- increased parallelism may lead to greater overall query/update throughput (each canister is single-threaded… multiple canisters means multiple threads of execution)
- increased stable memory storage (max 8 GB per canister * number of canisters)
- modular upgrades may save cycles (if you only need to upgrade A data, then upgrade A canister instead of a single canister with both A and B)
- more flexible configuration (maybe you want to blackhole canister A but retain control of canister B… canonical example is a token canister)
I’m sure there are more, but those are the ones that come to mind first.
Thank you for both replies. I now better understand the tradeoffs
I am so excited for the future of the internet