Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Cache] Add dynamodb cache adapter #41498

Closed
shouze opened this issue Jun 1, 2021 · 6 comments
Closed

[Cache] Add dynamodb cache adapter #41498

shouze opened this issue Jun 1, 2021 · 6 comments

Comments

@shouze
Copy link

shouze commented Jun 1, 2021

Description

Add a new adapter in the cache component to be able to use couchbase as a cache system. DynamoDB is very similar to Couchbase which has been added in 2019 #32038.

馃挕 Good to know is that if you deploy php app as AWS Lambda, mosft of the time if you want a shared cache like redis, you need to put them into a VPC in odrer to use AWS elasticache. Having a lambda in a VPC augments deployment complexity and it's not always a good idea if you just need a redis cache.

鈿狅笍 of course here comes the how to avoid having a dependency on either official aws sdk, or better on async-aws/dynamo-db.

There's already an issue opened on async-aws async-aws/aws#998 and also this bundle. And since Amazon has released DAX maybe could a good cache solution? ping 馃 @Nyholm

@Nyholm
Copy link
Member

Nyholm commented Jun 4, 2021

Using DynamoDB as a cache is possible but Im not sure it is optimal. If you are in the AWS ecosystem, the button for creating an ElasticCache with Redis is so close to creating a new DynamoDB.

I would be happy to add a PSR-6 integration for DynamoDB to AsyncAWS. We can also depend on Symfony's cache component if that would make things easier for us.

But Im really on the fence that this would be a popular adapter for most Symfony users.

@shouze
Copy link
Author

shouze commented Jun 4, 2021

Using DynamoDB as a cache is possible but Im not sure it is optimal. If you are in the AWS ecosystem, the button for creating an ElasticCache with Redis is so close to creating a new DynamoDB.

Yes of course this make no doubt. Using elasticache is easy, but implies creating a lot of AWS resources. Depending on your compute ressources use cases (lambda, ecs, eks, app runner, ...) :

  • subnets
  • vpc
  • nat gateway
  • ...

Regarding optimal/non optimal concern. Yes, standard/traditionnal use of DynamoDB is probably sub optimal vs redis. But the point is that since june 2017 Amazon has released DAX (DynamoDB Accelerator) and this solution is now repertoried aside of elasticache.

I would be happy to add a PSR-6 integration for DynamoDB to AsyncAWS. We can also depend on Symfony's cache component if that would make things easier for us.

Makes sense indeed to start by adding PSR-6 integration into AsyncAWS. And regarding Symfony ease of integration do you mind to manage that inside AsyncAWS bundle?

But Im really on the fence that this would be a popular adapter for most Symfony users.

Hope too.

@shouze
Copy link
Author

shouze commented Jun 4, 2021

BTW after double checking, DAX will also require to be in a VPC as an opposite of DynamoDB
image

So for infrequent/non performance sensible cache use case you can use DynamoDB outside of a VPC. And if you want similar performance than redis, you need to be in a VPC too. Only difference is that you simplify your stack by not having to manage multiple protocols/vendors/extensions.

@carsonbot
Copy link

Thank you for this suggestion.
There has not been a lot of activity here for a while. Would you still like to see this feature?

@carsonbot
Copy link

Could I get an answer? If I do not hear anything I will assume this issue is resolved or abandoned. Please get back to me <3

@carsonbot
Copy link

Hey,

I didn't hear anything so I'm going to close it. Feel free to comment if this is still relevant, I can always reopen!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants