Backing services are external resources that your application depends on. These services can range from caching solutions like Redis to email providers, object storage services, and more. For instance, we integrated Redis as a caching service in our application to store the visitor count. Other typical backing services include:Documentation Index
Fetch the complete documentation index at: https://notes.kodekloud.com/llms.txt
Use this file to discover all available pages before exploring further.
- SMTP services for sending emails
- S3 integrations for storing images
- Managed databases and search engines
The concept of treating backing services as attached resources enables seamless scaling and flexibility. Simply update configuration details to point your application to a new instance without modifying any code logic.
Redis as a Backing Service Example
Consider Redis, which we use as a caching layer:- Local Instance: You might run Redis on your local machine during development.
- Cloud Deployment: In a production environment, Redis might be hosted on a cloud provider like AWS or Azure.
- Managed Service: Alternatively, you could use a managed Redis service offered by various vendors.
Ensure that all your backing services are configurable via environment variables or external configurations. This decouples service specifics from your application code, enhancing portability and maintainability.