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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Akamai support? #142

Open
andrerom opened this issue Dec 1, 2014 · 13 comments
Open

Akamai support? #142

andrerom opened this issue Dec 1, 2014 · 13 comments

Comments

@andrerom
Copy link
Contributor

andrerom commented Dec 1, 2014

Just to start the discussion, anyone looked into feasibility of Akamai support?

Might also be interesting to support other CDN's as well, but Akamai is typically preferred choice among media companies and they often use it already.

@dbu
Copy link
Contributor

dbu commented Dec 1, 2014

personally i never used akamai so i have little experience. let me just ask a bunch of questions:

  1. what would be the use case we can cover in this library? invalidating data on a cdn? anything else?
  2. are there any akamai/cdn client php libraries around? what would integration of those into FOSHttpCache bring?

@andrerom
Copy link
Contributor Author

andrerom commented Dec 1, 2014

  1. That is about it. Unsure if purging by tag can be done, so might need to keep track of urls to tags using stash for instance.
  2. I couldn't find one for their Rest API which seesm to deprecate the soap api which is supported by https://github.com/stephanoff/php-akamai

@dbu
Copy link
Contributor

dbu commented Dec 2, 2014

if akamai has no tagging, keeping an index on the application side sounds interesting. indeed that could share a lot with FriendsOfSymfony/FOSHttpCacheBundle#167 . but you would need to store the akamai tag stash somewhere else than in a cache folder - you do not want to loose that information, or you won't find your resources anymore.

@dbu
Copy link
Contributor

dbu commented Dec 2, 2014

for 2) i think an akamai rest api should not be part of this library, that goes too far. so if you want to work on this, please check very well if there really is no such client, and then lets see if its more than 1-2 trivial calls we need and if so, start an akamai rest library in php that we can use here ;-) if its trivial calls, i can live with having them here.

@andrerom
Copy link
Contributor Author

andrerom commented Dec 2, 2014

you do not want to loose that information, or you won't find your resources anymore.

true, good point

  1. ...

I'll pass the ball back to the customer that seemed interested in this, they might be up for contributing, or they might get in contact with Akamai about such a php rest client project.

@gggeek
Copy link

gggeek commented Dec 2, 2014

Making sure that the added feature covers at least 2 providers and is thus not bound to a single one: Edgecast is quite popular and has APIs for purge as well. To get started, see eg: https://kb.edgewebhosting.net/KnowledgebaseArticle53812.aspx, https://www.npmjs.org/package/edgecast

@ddeboer
Copy link
Member

ddeboer commented Dec 2, 2014

I don’t have much experience with such CDN providers myself. Just checking: do they really store HTTP responses? Or are they more about storing random chunks of data? We should remember this library is about HTTP caching. 😉

@dbu
Copy link
Contributor

dbu commented Dec 2, 2014

Yep, there is a risk of overdoing the scope of this bundle. SonataCacheBundle is also doing stuff with cdn's. What i totally see here is integration with some cdn library to use our mechanisms to invalidate paths, routes or tags.

But a multi-cdn client library would have to be separate or we start doing too many things in this library.

@andrerom
Copy link
Contributor Author

andrerom commented Mar 3, 2020

Small update here, @kmadejski did a small prototype for eZ on this and there are some good news and some bad news:

  • Tagging is now supported, so it's possible to purge by that
  • We didn't see anyway so far to accomplish x-user-context-hash kind of feature, so it would be be limited to traffic to anonymous users it seems

For me those two features are kind of key for FOSHttpCache, so maybe that rules out adding support for it here unless someone sees a way.

@dbu
Copy link
Contributor

dbu commented Mar 3, 2020

i am okay with having akamai support without the context hash in it. FOSHttpCache is also about cache tagging and invalidation of paths / banning. as long as documentation is clear what can be used and how (example config for akamai etc) i think its cool to have it.

@kmadejski
Copy link

@dbu thanks for the reply.
I think I can easily share what I did, but my current schedule is extremely busy. I will try to look into that in a couple of weeks.

@dbu
Copy link
Contributor

dbu commented Mar 4, 2020

@kmadejski would be awesome if you can share / show it somewhere. a pull request with documentation would be very cool of course, but a blog post just explaining what you did and showing the files you did without integrating them into the repository here could be a start as well. then someone else who needs akamai support could maybe contribute the change, if you license your code accordingly.

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

No branches or pull requests

5 participants