Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Aws Load Balancer/autoscaling/elastic Beanstalk Rate Topic   - - - - -

 
  • jmottle
  • Member
  • Members
  • Join Date: 14-Aug 09
  • 81 posts

Posted 05 February 2020 - 06:07 AM #1

We are moving all of our web applications to AWS in a few weeks, but I've been unable to ascertain if CS-CART can be installed into an auto-scale environment using Elastic Beanstalk.  We need to figure out if we have to just stand up stand alone storage and EC2 instance or if we can do this a bit more intelligently.  The support team at CSCart were unable to tell us, which makes me think it's not possible.

I have seen the settings for CDN, but it's unclear if this is just caching files or if it's providing upload access to an S3 bucket.  

Any advice here would be greatly appreciated.

 

Cheers,

Jeff



 
  • theanalyst
  • Advanced Member
  • Members
  • Join Date: 17-Oct 19
  • 52 posts

Posted 22 February 2020 - 09:15 AM #2

HI Jeff

 

Unsure on this, it is something I would be interested to see if it can work. Another guy is trying to get it to work here

https://forum.cs-car...rs/#entry324899

 

If CScart are unable to help, that would lead me to believe that standalone using Varnish cache as linked in the above thread is the most efficient way.

With that said I may try a dev setup myself and see if I can beat the problems. It is for sure a very nice solution if it can be made to work



 
  • theanalyst
  • Advanced Member
  • Members
  • Join Date: 17-Oct 19
  • 52 posts

Posted 22 February 2020 - 09:48 AM #3

Would be worth asking someone like tbirnseth on here if they have done it. He is a knowledgeable dev on this platform.



 

Posted 22 February 2020 - 09:59 AM #4

We are moving all of our web applications to AWS in a few weeks, but I've been unable to ascertain if CS-CART can be installed into an auto-scale environment using Elastic Beanstalk.  We need to figure out if we have to just stand up stand alone storage and EC2 instance or if we can do this a bit more intelligently.  The support team at CSCart were unable to tell us, which makes me think it's not possible.

I have seen the settings for CDN, but it's unclear if this is just caching files or if it's providing upload access to an S3 bucket.  

Any advice here would be greatly appreciated.

 

Cheers,

Jeff

This seems to be a pretty easy problem to solve. CS-Cart already has abstracted file storage (except a few third-party addons maybe, but that shouldn't be too hard to figure out). Therefore it shouldn't be too hard to figure some way of scaling your application.

 

To come back to @theanalyst, scaling your application is a great way to make sure your application is always online. Imagine that one of your servers stops working. If your servers can be automatically scaled, you can just kill the failing server and restart it with a fresh installation. Meaning that you can more easily recover from disaster situations.

 

Jeff, you could easily achieve your auto-scaling by writing your own file storage adapter for S3. For sessions you could write your own DynamoDB adapter, and finally for caching you will have to implement a system which rejects some caching keys (specifically the ones for the SEO module).

 

If you need any assistance, please contact me at harmsmitsdev@gmail.com



 
  • theanalyst
  • Advanced Member
  • Members
  • Join Date: 17-Oct 19
  • 52 posts

Posted 22 February 2020 - 12:30 PM #5

Interesting to hear harmsmitsdev,  I realise scaling is the best solution, just didn't realise it was possible so easily with cscart. Has anyone got this setup working for their store on here out of interest?



 
  • jmottle
  • Member
  • Members
  • Join Date: 14-Aug 09
  • 81 posts

Posted 23 February 2020 - 02:42 AM #6

Thanks all for the feedback.  I guess this confirms this can't be done natively, which for now it what we needed to know. I guess in the future we can look at doing custom code. Right now too many other projects underway to undertake this too.   

Can someone provide some more info on the abstracted file system.  My understanding it could only mirror imagery CDN endpoints, but clearly I've missed something if the files can be abstracted.  We ideally would like to abstract everything. All product and app imagery as well as all our digital download.  Is this possible?



 

Posted 23 February 2020 - 07:32 AM #7

@jmottle It's not that hard to do. All you have to do is extend the `Tygh/Backend/Storage/ABackend` class to e.g. `Tygh/Backend/Storage/MyStorageSolution` and handle all function calls accordingly.