N
Novu13mo ago
sgrzelak

Novu embed,widget,ws service load size

Hi, I have added a chart of outgoing bytes from the given services like ws,embed and widget. Is it possible that you could be explain for what such a services are responsible? WS this is websocket and I have expected that the biggest bytes loadout will be there, but the embed and widget services got much much higher loadout than ws and than i have expected. Will you explain me why is that and for what purpose are that services? Thanks for answer
4 Replies
sgrzelak
sgrzelak13mo ago
#postscript This charts are from my haproxy where i can monitor the flow and more things do I mean correct? If I settle novu on page using clean js "<script> (function(n,o,t,i,f) { n[i] = {}; var m = ['init', 'on']; n[i]._c = [];m.forEach(me => n[i][me] = function() {n[i]._c.push([me, arguments])}); var elt = o.createElement(f); elt.type = "text/javascript"; elt.async = true; elt.src = t; var before = o.getElementsByTagName(f)[0]; before.parentNode.insertBefore(elt, before); })(window, document, 'http://localhost:4701/embed.umd.min.js', 'novu', 'script'); novu.init('M964chCO9r5W', '#notification-bell', { subscriberId: "on-boarding-subscriber-id-123", }); </script> " it is using embed and widget to pull more scripts but when I use react components the widget and embed services are not needed? @Pawan Jain has any idea?
empe
empe13mo ago
Based on the information provided, if you are using Novu notifications with React Components, you will not need to use the embed or widget services to pull more scripts. For the first question, @Pawan Jain might help
Dima Grossman
Dima Grossman13mo ago
Those services are using more network because they are serving static assets such as javascript, css and image files. To optimize those you could upload them to a CDN and utilize caching headers since those static assets won’t change frequently. And as Emil mentioned, you will only need those services if you are using the IFrame approach of the notification center. React, angular, headless, vie and etc… do not use those services
sgrzelak
sgrzelak13mo ago
ok, thanks guys for answer